Skip to content

Commit 44db1f0

Browse files
authored
Replace versioneer with setuptools-scm. (#24)
1 parent 4a305ea commit 44db1f0

File tree

11 files changed

+90
-2534
lines changed

11 files changed

+90
-2534
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ __pycache__
1313
*.egg-info
1414

1515
.pytask.sqlite3
16+
17+
build
18+
dist
19+
src/pytask_parallel/_version.py

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ repos:
3030
rev: v2.5.0
3131
hooks:
3232
- id: reorder-python-imports
33+
- repo: https://github.com/asottile/setup-cfg-fmt
34+
rev: v1.17.0
35+
hooks:
36+
- id: setup-cfg-fmt
3337
- repo: https://github.com/psf/black
3438
rev: 21.6b0
3539
hooks:
@@ -54,6 +58,7 @@ repos:
5458
flake8-print,
5559
flake8-pytest-style,
5660
flake8-todo,
61+
flake8-typing-imports,
5762
flake8-unused-arguments,
5863
pep8-naming,
5964
pydocstyle,

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-parallel>`_
1111
------------------
1212

1313
- :gh:`19` adds ``conda-forge`` to the ``README.rst``.
14+
- :gh:`22` add note that the debugger cannot be used together with pytask-parallel.
15+
- :gh:`24` replaces versioneer with setuptools-scm.
1416

1517

1618
0.0.8 - 2021-03-05

environment.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: pytask-parallel
2+
23
channels:
34
- conda-forge
4-
- pytask
5+
- nodefaults
6+
57
dependencies:
68
- python
79
- pip
10+
- setuptools_scm
11+
- toml
812

913
# Conda
1014
- anaconda-client
@@ -16,6 +20,15 @@ dependencies:
1620
- cloudpickle
1721
- loky
1822

23+
# pytask package dependencies
24+
- attrs >=17.4.0
25+
- click
26+
- click-default-group
27+
- networkx >=2.4
28+
- pluggy
29+
- pony >=0.7.13
30+
- rich
31+
1932
# Misc
2033
- black
2134
- bump2version

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
3+
4+
5+
[tool.setuptools_scm]
6+
write_to = "src/pytask_parallel/_version.py"

setup.cfg

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,48 @@
1-
[versioneer]
2-
VCS = git
3-
style = pep440
4-
versionfile_source = src/pytask_parallel/_version.py
5-
versionfile_build = pytask_parallel/_version.py
6-
tag_prefix = v
7-
parentdir_prefix = pytask-parallel-
1+
[metadata]
2+
name = pytask_parallel
3+
description = Parallelize the execution of tasks with pytask.
4+
long_description = file: README.rst
5+
long_description_content_type = text/x-rst
6+
author = Tobias Raabe
7+
author_email = raabe@posteo.de
8+
license = MIT
9+
license_file = LICENSE
10+
platforms = any
11+
classifiers =
12+
Development Status :: 3 - Alpha
13+
License :: OSI Approved :: MIT License
14+
Operating System :: OS Independent
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3 :: Only
17+
Programming Language :: Python :: 3.6
18+
Programming Language :: Python :: 3.7
19+
Programming Language :: Python :: 3.8
20+
Programming Language :: Python :: 3.9
21+
project_urls =
22+
Changelog = https://github.com/pytask-dev/pytask-parallel/blob/main/CHANGES.rst
23+
Documentation = https://github.com/pytask-dev/pytask-parallel
24+
Github = https://github.com/pytask-dev/pytask-parallel
25+
Tracker = https://github.com/pytask-dev/pytask-parallel/issues
26+
27+
[options]
28+
packages = find:
29+
install_requires =
30+
click
31+
cloudpickle
32+
loky
33+
pytask>=0.0.11
34+
python_requires = >=3.6
35+
include_package_data = True
36+
package_dir = =src
37+
zip_safe = False
38+
39+
[options.packages.find]
40+
where = src
41+
42+
[options.entry_points]
43+
pytask =
44+
pytask_parallel = pytask_parallel.plugin
45+
46+
[check-manifest]
47+
ignore =
48+
src/pytask_parallel/_version.py

setup.py

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,4 @@
1-
from pathlib import Path
2-
3-
from setuptools import find_packages
41
from setuptools import setup
52

6-
import versioneer
7-
8-
9-
README = Path("README.rst").read_text()
10-
11-
PROJECT_URLS = {
12-
"Documentation": "https://github.com/pytask-dev/pytask-parallel",
13-
"Github": "https://github.com/pytask-dev/pytask-parallel",
14-
"Tracker": "https://github.com/pytask-dev/pytask-parallel/issues",
15-
"Changelog": "https://github.com/pytask-dev/pytask-parallel/blob/main/CHANGES.rst",
16-
}
17-
18-
19-
setup(
20-
name="pytask-parallel",
21-
version=versioneer.get_version(),
22-
cmdclass=versioneer.get_cmdclass(),
23-
description="Parallelize the execution of pytask.",
24-
long_description=README,
25-
long_description_content_type="text/x-rst",
26-
author="Tobias Raabe",
27-
author_email="raabe@posteo.de",
28-
python_requires=">=3.6",
29-
url=PROJECT_URLS["Github"],
30-
project_urls=PROJECT_URLS,
31-
license="MIT",
32-
classifiers=[
33-
"Development Status :: 3 - Alpha",
34-
"Operating System :: OS Independent",
35-
"Programming Language :: Python :: 3",
36-
"Programming Language :: Python :: 3 :: Only",
37-
"Programming Language :: Python :: 3.6",
38-
"Programming Language :: Python :: 3.7",
39-
"Programming Language :: Python :: 3.8",
40-
"Programming Language :: Python :: 3.9",
41-
],
42-
install_requires=[
43-
"click",
44-
"cloudpickle",
45-
"loky",
46-
"pytask >= 0.0.11",
47-
],
48-
platforms="any",
49-
packages=find_packages(where="src"),
50-
package_dir={"": "src"},
51-
entry_points={"pytask": ["pytask_parallel = pytask_parallel.plugin"]},
52-
include_package_data=True,
53-
zip_safe=False,
54-
)
3+
if __name__ == "__main__":
4+
setup()

src/pytask_parallel/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
"""The entry-point for pytask-parallel."""
2-
from ._version import get_versions
1+
try:
2+
from ._version import version as __version__
3+
except ImportError:
4+
# broken installation, we don't even try unknown only works because we do poor mans
5+
# version compare
6+
__version__ = "unknown"
37

4-
__version__ = get_versions()["version"]
5-
del get_versions
8+
9+
__all__ = ["__version__"]

0 commit comments

Comments
 (0)