diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e2f4687..7635576 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -58,3 +58,35 @@ jobs: - name: Run pylint run: | pylint --disable=fixme --fail-under=8.0 cgsmiles + + deploy: + needs: lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Install pypa/build + run: | + pip install build + pip install pbr + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true + repository-url: https://test.pypi.org/legacy/ + user: __token__ + password: ${{ secrets.PYPI_TEST_API_TOKEN }} diff --git a/cgsmiles/__init__.py b/cgsmiles/__init__.py index 18eca30..9d11b14 100644 --- a/cgsmiles/__init__.py +++ b/cgsmiles/__init__.py @@ -1,6 +1,8 @@ """ CGsmiles: Coarse-Grained Smiles (CGsmiles) for representing abitrarily complex molecules using line notation. """ +import pbr.version +__version__ = pbr.version.VersionInfo('cgsmiles').release_string() from .read_cgsmiles import read_cgsmiles from .read_fragments import read_fragments diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f85128e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +pbr +numpy +networkx +pysmiles @ git+https://github.com/pckroon/pysmiles.git@master diff --git a/setup.cfg b/setup.cfg index 6a725c0..37fbac9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,13 +30,14 @@ packages = find: setup-requires = setuptools >= 46.4.0 pbr -install-requires = # ?? requires-dist? - pbr - numpy - networkx >= 2.0 - pysmiles @ git+https://github.com/pckroon/pysmiles.git@master zip-safe = False +[egg_info] +tag_build = .dev +tag_date = 1 + +[pbr] +version = 0.0.0 #[build_sphinx] #source-dir = doc/source diff --git a/setup.py b/setup.py index b40a3bc..1eb4a54 100644 --- a/setup.py +++ b/setup.py @@ -2,4 +2,5 @@ setup( pbr=True, + requirements='requirements.txt' )