Skip to content

Replace versioneer with setuptools-scm. #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ __pycache__
*.egg-info

.pytask.sqlite3

build
dist
src/pytask_latex/_version.py
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
hooks:
- id: blacken-docs
additional_dependencies: [black]
- repo: https://github.com/PyCQA/flake8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand All @@ -54,6 +54,7 @@ repos:
flake8-print,
flake8-pytest-style,
flake8-todo,
flake8-typing-imports,
flake8-unused-arguments,
pep8-naming,
pydocstyle,
Expand All @@ -63,6 +64,10 @@ repos:
rev: 0.9.0
hooks:
- id: doc8
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/econchick/interrogate
rev: 1.4.0
hooks:
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ reverse chronological order. Releases follow `semantic versioning
<https://anaconda.org/conda-forge/pytask-environment>`_.


0.0.5 - 2021-07-23
------------------

- :gh:`8` replaces versioneer with setuptools-scm.


0.0.4 - 2021-03-05
------------------

Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ exclude tox.ini

include README.rst
include LICENSE
include versioneer.py
include src/pytask_environment/_version.py
2 changes: 0 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ coverage:
ignore:
- ".tox/**/*"
- "setup.py"
- "versioneer.py"
- "src/pytask_environment/_version.py"
9 changes: 6 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: pytask-environment

channels:
- conda-forge
- pytask
- nodefaults

dependencies:
- python=3.8
- python >=3.6
- pip
- setuptools_scm
- toml

# Conda
- anaconda-client
Expand All @@ -21,4 +25,3 @@ dependencies:
- pre-commit
- pytest-cov
- pytest-xdist
- versioneer
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]


[tool.setuptools_scm]
write_to = "src/pytask_environment/_version.py"
51 changes: 44 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,44 @@
[versioneer]
VCS = git
style = pep440
versionfile_source = src/pytask_environment/_version.py
versionfile_build = pytask_environment/_version.py
tag_prefix = v
parentdir_prefix = pytask-environment-
[metadata]
name = pytask_environment
description = Detect changes in your pytask environment and abort a project build.
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://github.com/pytask-dev/pytask-environment
author = Tobias Raabe
author_email = raabe@posteo.de
license = MIT
license_file = LICENSE
platforms = any
classifiers =
Development Status :: 3 - Alpha
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
project_urls =
Changelog = https://github.com/pytask-dev/pytask-environment/blob/main/CHANGES.rst
Documentation = https://github.com/pytask-dev/pytask-environment
Github = https://github.com/pytask-dev/pytask-environment
Tracker = https://github.com/pytask-dev/pytask-environment/issues

[options]
packages = find:
install_requires =
click
pony
pytask>=0.0.7
python_requires = >=3.6
include_package_data = True
package_dir = =src
zip_safe = False

[options.packages.find]
where = src

[options.entry_points]
pytask =
pytask_environment = pytask_environment.plugin
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,49 +1,5 @@
from pathlib import Path

from setuptools import find_packages
from setuptools import setup

import versioneer

README = Path("README.rst").read_text()

PROJECT_URLS = {
"Documentation": "https://github.com/pytask-dev/pytask-environment",
"Github": "https://github.com/pytask-dev/pytask-environment",
"Tracker": "https://github.com/pytask-dev/pytask-environment/issues",
"Changelog": "https://github.com/pytask-dev/pytask-environment/blob/main/"
"CHANGES.rst",
}


setup(
name="pytask-environment",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Detect changes in your pytask environment and abort a project build.",
long_description=README,
long_description_content_type="text/x-rst",
author="Tobias Raabe",
author_email="raabe@posteo.de",
python_requires=">=3.6",
url=PROJECT_URLS["Github"],
project_urls=PROJECT_URLS,
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
install_requires=["click", "pony", "pytask >= 0.0.7"],
platforms="any",
packages=find_packages(where="src"),
package_dir={"": "src"},
entry_points={"pytask": ["pytask_environment = pytask_environment.plugin"]},
include_package_data=True,
zip_safe=False,
)
if __name__ == "__main__":
setup()
11 changes: 8 additions & 3 deletions src/pytask_environment/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from ._version import get_versions
try:
from ._version import version as __version__
except ImportError:
# broken installation, we don't even try unknown only works because we do poor mans
# version compare
__version__ = "unknown"

__version__ = get_versions()["version"]
del get_versions

__all__ = ["__version__"]
Loading