diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..21687eb --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,34 @@ +name: pypi +on: [push] +jobs: + pypi: + name: upload to pypi + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install build prerequisites + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + run: | + python -m pip install --upgrade twine build cibuildwheel + - name: sdist + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + run: | + python -m build --sdist + - name: wheel + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + run: | + python -m cibuildwheel --output-dir wheelhouse + - name: upload + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + twine upload dist/* + twine upload wheelhouse/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ae5db1e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[build-system] +requires = ["setuptools>=42", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "py2bit" +version = "0.3.3" +description = "A package for accessing 2bit files using lib2bit" +authors = [ + { name = "Devon P. Ryan", email = "dpryan79@gmail.com" } +] +license = { text = "MIT" } +readme = "README.md" +keywords = ["bioinformatics", "2bit"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved", + "Programming Language :: C", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: Implementation :: CPython", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS" +] + +[project.urls] +download = "https://github.com/deeptools/py2bit" +homepage = "https://github.com/deeptools/py2bit" + +# Enable version inference from scm +[tool.setuptools_scm] + +# Target only minimum CPython version 3.9 on linux for wheel build +[tool.cibuildwheel] +skip = "pp* cp38-* *-manylinux_i686 *_ppc64le *_s390x *-musllinux_x86_64 *-musllinux_i686" + +[tool.cibuildwheel.linux] +manylinux-x86_64-image = "manylinux2014" diff --git a/setup.py b/setup.py index 9a3ff17..bc10a0a 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ include_dirs = ['lib2bit', sysconfig.get_config_var("INCLUDEPY")]) setup(name = 'py2bit', - version = '0.3.2', + version = '0.3.3', description = 'A package for accessing 2bit files using lib2bit', author = "Devon P. Ryan", author_email = "dpryan79@gmail.com",