Skip to content

Replace versioneer with setuptools-scm. #13

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 3 commits into from
Jul 21, 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
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

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_stata/_version.py
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ repos:
rev: v2.5.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
Expand All @@ -62,6 +66,7 @@ repos:
flake8-print,
flake8-pytest-style,
flake8-todo,
flake8-typing-imports,
flake8-unused-arguments,
pep8-naming,
pydocstyle,
Expand Down
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ an
`Anaconda.org <https://anaconda.org/conda-forge/pytask-stata>`_.


0.0.7 - 2021-xx-xx
0.1.0 - 2021-07-21
------------------

- :gh:`11` fixes the ``README.rst``.
- :gh:`14` fixes tests and aligns pytask-stata with pytask 0.1.0.
- :gh:`13` replaces versioneer with setuptools-scm.
- :gh:`14` fixes tests and aligns pytask-stata with pytask v0.1.0.


0.0.6 - 2021-03-05
Expand Down
5 changes: 4 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: pytask-stata

channels:
- conda-forge
- nodefaults

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

# Conda
- anaconda-client
Expand Down
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_stata/_version.py"
54 changes: 47 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
[versioneer]
VCS = git
style = pep440
versionfile_source = src/pytask_stata/_version.py
versionfile_build = pytask_stata/_version.py
tag_prefix = v
parentdir_prefix = pytask-stata-
[metadata]
name = pytask_stata
description = Execute do-files with Stata and pytask.
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://github.com/pytask-dev/pytask-stata
author = Tobias Raabe
author_email = [email protected]
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 =
Documentation = https://github.com/pytask-dev/pytask-stata
Github = https://github.com/pytask-dev/pytask-stata
Tracker = https://github.com/pytask-dev/pytask-stata/issues
Changelog = https://github.com/pytask-dev/pytask-stata/blob/main/CHANGES.rst

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

[options.packages.find]
where = src

[options.entry_points]
pytask =
pytask_stata = pytask_stata.plugin

[check-manifest]
ignore =
src/pytask_stata/_version.py
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-stata",
"Github": "https://github.com/pytask-dev/pytask-stata",
"Tracker": "https://github.com/pytask-dev/pytask-stata/issues",
"Changelog": "https://github.com/pytask-dev/pytask-stata/blob/main/CHANGES.rst",
}


setup(
name="pytask-stata",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Execute do-files with Stata and pytask.",
long_description=README,
long_description_content_type="text/x-rst",
author="Tobias Raabe",
author_email="[email protected]",
url=PROJECT_URLS["Github"],
project_urls=PROJECT_URLS,
python_requires=">=3.6",
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", "pytask >= 0.0.9"],
platforms="any",
packages=find_packages(where="src"),
package_dir={"": "src"},
entry_points={"pytask": ["pytask_stata = pytask_stata.plugin"]},
include_package_data=True,
zip_safe=False,
)
if __name__ == "__main__":
setup()
11 changes: 8 additions & 3 deletions src/pytask_stata/__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