diff --git a/.github/workflows/ci-bcf-pypi.yml b/.github/workflows/ci-bcf-pypi.yml index ae0a3a8900..03bff9ab75 100644 --- a/.github/workflows/ci-bcf-pypi.yml +++ b/.github/workflows/ci-bcf-pypi.yml @@ -48,10 +48,10 @@ jobs: run: | pip install build cd src/bcf && - python -m build + make dist - name: Publish a Python distribution to PyPI uses: ortega2247/pypi-upload-action@master with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: src/bcf/dist + packages_dir: src/bcf/dist \ No newline at end of file diff --git a/src/bcf/Makefile b/src/bcf/Makefile index 3a3913b971..e310fd08c1 100644 --- a/src/bcf/Makefile +++ b/src/bcf/Makefile @@ -1,3 +1,9 @@ +VERSION:=`date '+%y%m%d'` +SED:=sed -i +ifeq ($(UNAME_S),Darwin) +SED:=sed -i '' -e +endif + .PHONY: ci ci: tox @@ -12,6 +18,13 @@ models: cd src && xsdata generate -p bcf.v2.model --unnest-classes --kw-only --slots -ds Google bcf/v2/xsd cd src && xsdata generate -p bcf.v3.model --unnest-classes --kw-only --slots -ds Google bcf/v3/xsd +.PHONY: dist +dist: + rm -rf dist + $(SED) "s/999999/$(VERSION)/" pyproject.toml + python -m build + $(SED) "s/$(VERSION)/999999/" pyproject.toml + # .PHONY # api: -# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0 +# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0 \ No newline at end of file diff --git a/src/bcf/pyproject.toml b/src/bcf/pyproject.toml index 7dc6d22176..4d7f1b401b 100644 --- a/src/bcf/pyproject.toml +++ b/src/bcf/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "numpy", "ifcopenshell", ] -version = "0.0.1" +version = "0.0.999999" classifiers = [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", @@ -76,7 +76,7 @@ deps = black isort pylint -commands = +commands = black {posargs:.} isort {posargs:.} pylint {posargs:.} --output-format=colorized @@ -138,4 +138,4 @@ max-attributes = 10 [tool.pylint.format] expected-line-ending-format = "LF" -max-line-length = 120 +max-line-length = 120 \ No newline at end of file