Skip to content

Commit

Permalink
Merge pull request #254 from jenshnielsen/pep518
Browse files Browse the repository at this point in the history
Convert plottr to a pep518 based installation
  • Loading branch information
jenshnielsen committed Jan 4, 2022
2 parents cdeb974 + d74a4d2 commit 252ad1e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ jobs:
with:
python-version: '3.7'
- uses: ./.github/actions/install-dependencies-and-plottr
- name: Install build deps
run: pip install --upgrade build
- name: Build
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Install Twine
run: pip install twine
- name: Publish
Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build-system]
requires = [
"setuptools >= 48",
"wheel >= 0.29.0",
]
build-backend = 'setuptools.build_meta'

[tool.mypy]
strict_optional = true
ignore_missing_imports = true
show_column_numbers = true
warn_unused_ignores = true
warn_unused_configs = true
warn_redundant_casts = true
no_implicit_optional = true
disallow_untyped_defs = true

[[tool.mypy.overrides]]
module = [
"plottr._version"
]
ignore_errors = true
15 changes: 0 additions & 15 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,3 @@ versionfile_source = plottr/_version.py
versionfile_build = plottr/_version.py
tag_prefix = v
parentdir_prefix = plottr-

[mypy]
strict_optional = True
ignore_missing_imports = True
show_column_numbers = True
warn_unused_ignores = True
warn_unused_configs = True
warn_redundant_casts = True
no_implicit_optional = True

[mypy-plottr.*]
disallow_untyped_defs = True

[mypy-plottr._version]
ignore_errors = True
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import os
import sys

from setuptools import setup

# we need to import versioneer from the current dir
# once versioneer is pep517/518 compliant this can be removed
sys.path.append(os.path.dirname(__file__))
import versioneer

setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)
sys.path.pop()

if __name__ == "__main__":
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)

0 comments on commit 252ad1e

Please sign in to comment.