diff --git a/MANIFEST.in b/MANIFEST.in index f9cf2e5..3dec71f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,24 +1,17 @@ -include setup.py include README.md include LICENSE include *.txt -include MANIFEST.in # All source files recursive-include rdatasets * -# Add build and testing tools -include pytest.ini - # Exclude what we don't want to include -prune build -prune dist -prune doc/build -prune util -prune */__pycache__ -prune rdatasets_orig -prune convertCSVtoPickle.py -prune convertHTMLtoPickle.py - -global-exclude *.py[cod] *.egg *.egg-info -global-exclude *~ *.bak *.swp +exclude .gitignore +exclude .gitmodules +exclude .pre-commit-config.yaml +exclude .flake8 +recursive-exclude */__pycache__ +recursive-exclude * *.py[co] +prune rdatasets_orig/ +exclude convertCSVtoPickle.py +exclude convertHTMLtoPickle.py diff --git a/pyproject.toml b/pyproject.toml index 61a93ff..27a1899 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools >=61", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools] @@ -40,7 +40,6 @@ classifiers=[ 'Programming Language :: Python :: 3.12', 'Topic :: Software Development :: Libraries :: Python Modules', ] - dynamic=["version"] [tool.setuptools_scm] diff --git a/rdatasets/__init__.py b/rdatasets/__init__.py index 6dc3c36..ccd1754 100644 --- a/rdatasets/__init__.py +++ b/rdatasets/__init__.py @@ -5,4 +5,17 @@ from .rdatasets import data, descr, get_data_path, items, packages, summary -__all__ = ['packages', 'items', 'data', 'get_data_path', 'descr', 'summary'] +__all__ = [ + 'packages', + 'items', + 'data', + 'get_data_path', + 'descr', + 'summary', + '__version__', +] + +try: + from ._version import version as __version__ +except ImportError: + __version__ = "unknown"