summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-05-06 20:41:14 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-05-06 20:41:14 -0400
commita509e0147b6d12addec105ecdfadb5e3c6fb6255 (patch)
tree970e5ef17d468cf64621a58dd1e14c35e550774d
parentee509cc40c0ef6bd3a4b8e958a0c9330e2822238 (diff)
downloadsetuptools-scm-feature/build-require-self.tar.gz
Simply require self in build-requires. Now requires a PEP 518 compatible builder (pip 10 or later) to install.feature/build-require-self
-rw-r--r--pyproject.toml4
-rw-r--r--setup.py47
2 files changed, 4 insertions, 47 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 0a33ae6..bae5853 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,5 @@
[build-system]
-requires = ["setuptools>=34.4", "wheel", "jaraco.windows; python_version < '3'"]
+requires = ["setuptools>=34.4", "wheel", "setuptools_scm[toml]"]
build-backend = "setuptools.build_meta"
+
+[tool.setuptools_scm]
diff --git a/setup.py b/setup.py
index 23eb7ac..c304e96 100644
--- a/setup.py
+++ b/setup.py
@@ -1,50 +1,5 @@
-"""\
-important note:
-
-the setup of setuptools_scm is self-using,
-the first execution of `python setup.py egg_info`
-will generate partial data
-its critical to run `python setup.py egg_info`
-once before running sdist or easy_install on a fresh checkouts
-
-pip usage is recommended
-"""
-from __future__ import print_function
-import os
-import sys
import setuptools
-def scm_config():
- here = os.path.dirname(os.path.abspath(__file__))
- src = os.path.join(here, "src")
- egg_info = os.path.join(src, "setuptools_scm.egg-info")
- has_entrypoints = os.path.isdir(egg_info)
- import pkg_resources
-
- sys.path.insert(0, src)
- pkg_resources.working_set.add_entry(src)
- from setuptools_scm.hacks import parse_pkginfo
- from setuptools_scm.git import parse as parse_git
- from setuptools_scm.version import guess_next_dev_version, get_local_node_and_date
-
- def parse(root):
- try:
- return parse_pkginfo(root)
- except IOError:
- return parse_git(root)
-
- config = dict(
- version_scheme=guess_next_dev_version, local_scheme=get_local_node_and_date
- )
-
- if has_entrypoints:
- return dict(use_scm_version=config)
- else:
- from setuptools_scm import get_version
-
- return dict(version=get_version(root=here, parse=parse, **config))
-
-
if __name__ == "__main__":
- setuptools.setup(**scm_config())
+ setuptools.setup()