Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
somewheve committed Feb 8, 2024
1 parent b66b2c9 commit ab37d40
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 30 deletions.
Binary file added .DS_Store
Binary file not shown.
62 changes: 43 additions & 19 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,46 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python setup.py build
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python setup.py build
build_windows:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python setup.py build
6 changes: 0 additions & 6 deletions MAINFEST.in

This file was deleted.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include MANIFEST.in
recursive-include ctpbee_api *
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ def as_extension(self):
ext_modules = []
pkgs = ["ctpbee_api"]

package_data = []


def build(module_name, library_list, system, include_module):
ext = ApiExtension(module_name=module_name,
Expand All @@ -195,7 +193,6 @@ def build(module_name, library_list, system, include_module):
ext_modules.append(md)
ext_modules.append(td)
pkgs.append(include_module)
package_data.append("{}/*".format(module_name))
else:
del ext

Expand All @@ -215,8 +212,10 @@ def build(module_name, library_list, system, include_module):
license="MIT",
packages=pkgs,
include_package_data=True,
package_dir={"ctpbee_api": "ctpbee_api"},
install_requires=[],
platforms=["Windows", "Linux", "Mac OS-X"],
ext_modules=ext_modules,
package_data={"ctpbee_api": ["*"]}
package_data={
'ctpbee_api': ['*.so', '*.dylib', '*.dll', '*.a', 'thost*'],
},
)

0 comments on commit ab37d40

Please sign in to comment.