Skip to content

Commit

Permalink
Merge pull request #186 from HexDecimal/setuptools-meta
Browse files Browse the repository at this point in the history
Replace versioneer with setuptools-scm, migrate to pyproject.toml.
  • Loading branch information
HexDecimal authored May 26, 2023
2 parents 6bd623e + 8d6325a commit 1c038e8
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 2,797 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ per-file-ignores =
delocate/tmpdirs.py: E266
select = E,F,W
ignore = W503,W504,E203
exclude = versioneer.py delocate/_version.py
exclude = delocate/_version.py
7 changes: 3 additions & 4 deletions .github/workflows/pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
# checkout@v1 is required since versioneer uses git describe.
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install deployment dependencies
run: |
pip install wheel twine
pip install twine build
- name: Build distribution
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Delocate dependencies.
run: |
pip install pytest
python setup.py develop
pip install -e .
- name: MyPy
uses: liskin/gh-problem-matcher-wrap@v2
with:
Expand Down Expand Up @@ -99,10 +99,13 @@ jobs:
if-no-files-found: error
- name: Install test dependencies
run: |
pip install -r test-requirements.txt
pip install -r test-requirements.txt build
- name: Build delocate
run: |
python -m build
- name: Install delocate
run: |
python setup.py develop bdist_wheel
pip install -e .
- name: Upload wheel
uses: actions/upload-artifact@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dist/
MANIFEST
.coverage
delocate*info/
.cache
.cache
_version.py
1 change: 1 addition & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ follow_imports = skip
[mypy-delocate._version]
# Ignore delocate._version module.
ignore_errors = True
ignore_missing_imports = True
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include versioneer.py
include setup.cfg
include delocate/_version.py
include LICENSE
include README.rst
Expand Down
15 changes: 12 additions & 3 deletions delocate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# Init for delocate package

from . import _version
import warnings

from .delocating import delocate_path, delocate_wheel, patch_wheel
from .libsana import tree_libs, wheel_libs

__version__ = _version.get_versions()["version"]
del _version
try:
from ._version import __version__
except ImportError:
__version__ = "0.0.0"
warnings.warn(
"Delocate was not installed and is missing version metadata."
"\nMake sure this package is installed in development mode"
" with this command:\n\tpip install --editable .",
RuntimeWarning,
)

__all__ = (
"delocate_path",
Expand Down
Loading

0 comments on commit 1c038e8

Please sign in to comment.