mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-15 13:01:19 +02:00
xxx
This commit is contained in:
19
python/py-setuptools_scm/files/patch-setup.cfg
Normal file
19
python/py-setuptools_scm/files/patch-setup.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
Avoid errors during runtime if devel/py-packaging is not present.
|
||||
|
||||
The package is only required in "_version_cls.py" and falls back to
|
||||
devel/py-setuptools (via "try ... except") if it's not available.
|
||||
|
||||
This is a workaround to remedy issues with upgrade runs that also update
|
||||
devel/py-{packaging,pyparsing} in environments where devel/py-setuptools_scm is
|
||||
already present.
|
||||
|
||||
--- setup.cfg.orig 2021-12-05 20:43:43 UTC
|
||||
+++ setup.cfg
|
||||
@@ -27,7 +27,6 @@ classifiers =
|
||||
[options]
|
||||
packages = find:
|
||||
install_requires =
|
||||
- packaging>=20.0
|
||||
setuptools
|
||||
tomli>=1.0.0 # keep in sync
|
||||
python_requires = >=3.6
|
||||
@@ -0,0 +1,22 @@
|
||||
Workaround for https://github.com/pypa/setuptools_scm/issues/353
|
||||
|
||||
Original version (without the check for test sessions) obtained from:
|
||||
|
||||
https://github.com/OpenIndiana/oi-userland/commit/7d928fa26c0c5e4c29b4826fe78dc42401730529
|
||||
|
||||
--- src/setuptools_scm/file_finder_git.py.orig 2021-10-20 09:27:26 UTC
|
||||
+++ src/setuptools_scm/file_finder_git.py
|
||||
@@ -18,7 +18,12 @@ def _git_toplevel(path):
|
||||
stderr=devnull,
|
||||
)
|
||||
trace("find files toplevel", out)
|
||||
- return os.path.normcase(os.path.realpath(out.strip()))
|
||||
+ toplevel_path = os.path.normcase(os.path.realpath(out.strip()))
|
||||
+ setup_py_path = os.path.join(toplevel_path, "setup.py")
|
||||
+ if os.path.exists(setup_py_path) or os.environ.get("_PYTEST_SESSION"):
|
||||
+ return toplevel_path
|
||||
+ else:
|
||||
+ return None
|
||||
except subprocess.CalledProcessError:
|
||||
# git returned error, we are not in a git repo
|
||||
return None
|
||||
@@ -0,0 +1,22 @@
|
||||
Workaround for https://github.com/pypa/setuptools_scm/issues/353
|
||||
|
||||
Original version (without the check for test sessions) obtained from:
|
||||
|
||||
https://github.com/OpenIndiana/oi-userland/commit/7d928fa26c0c5e4c29b4826fe78dc42401730529
|
||||
|
||||
--- src/setuptools_scm/file_finder_hg.py.orig 2021-10-20 09:29:52 UTC
|
||||
+++ src/setuptools_scm/file_finder_hg.py
|
||||
@@ -13,7 +13,12 @@ def _hg_toplevel(path):
|
||||
universal_newlines=True,
|
||||
stderr=devnull,
|
||||
)
|
||||
- return os.path.normcase(os.path.realpath(out.strip()))
|
||||
+ toplevel_path = os.path.normcase(os.path.realpath(out.strip()))
|
||||
+ setup_py_path = os.path.join(toplevel_path, "setup.py")
|
||||
+ if os.path.exists(setup_py_path) or os.environ.get("_PYTEST_SESSION"):
|
||||
+ return toplevel_path
|
||||
+ else:
|
||||
+ return None
|
||||
except subprocess.CalledProcessError:
|
||||
# hg returned error, we are not in a mercurial repo
|
||||
return None
|
||||
@@ -0,0 +1,13 @@
|
||||
Avoid hardcoded Python binary.
|
||||
|
||||
--- testing/test_integration.py.orig 2022-02-10 17:16:34 UTC
|
||||
+++ testing/test_integration.py
|
||||
@@ -119,7 +119,7 @@ def test_pretend_version_accepts_bad_string(monkeypatc
|
||||
monkeypatch.setenv(PRETEND_KEY, "dummy")
|
||||
wd.write("setup.py", SETUP_PY_PLAIN)
|
||||
assert wd.get_version(write_to="test.py") == "dummy"
|
||||
- assert wd("python setup.py --version") == "0.0.0"
|
||||
+ assert wd("%%PYTHON_CMD%% setup.py --version") == "0.0.0"
|
||||
|
||||
|
||||
def test_own_setup_fails_on_old_python(monkeypatch):
|
||||
Reference in New Issue
Block a user