Skip to content

Commit 114a610

Browse files
author
Matthias Koeppe
committed
pkgs/sage-*: Add setuptools_scm workaround to setup.py
1 parent 0638968 commit 114a610

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

pkgs/sage-conf/setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
from setuptools import setup
2+
from setuptools.dist import Distribution
3+
4+
# setuptools plugins considered harmful:
5+
# If build isolation is not in use and setuptools_scm is installed,
6+
# then its file_finders entry point is invoked, which we don't need.
7+
# And with setuptools_scm 8, we get more trouble:
8+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
9+
# LookupError: setuptools-scm was unable to detect version ...
10+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
11+
Distribution._removed = staticmethod(lambda ep: True)
12+
213
setup()

pkgs/sage-conf_pypi/setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@
55
import platform
66

77
from setuptools import setup
8+
from setuptools.dist import Distribution
89
from distutils.command.build_scripts import build_scripts as distutils_build_scripts
910
from setuptools.command.build_py import build_py as setuptools_build_py
1011
from setuptools.command.egg_info import egg_info as setuptools_egg_info
1112
from distutils.errors import (DistutilsSetupError, DistutilsModuleError,
1213
DistutilsOptionError)
1314

15+
# setuptools plugins considered harmful:
16+
# If build isolation is not in use and setuptools_scm is installed,
17+
# then its file_finders entry point is invoked, which we don't need.
18+
# And with setuptools_scm 8, we get more trouble:
19+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
20+
# LookupError: setuptools-scm was unable to detect version ...
21+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
22+
Distribution._removed = staticmethod(lambda ep: True)
23+
24+
1425
class build_py(setuptools_build_py):
1526

1627
def run(self):

pkgs/sage-docbuild/setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/usr/bin/env python
22

33
from setuptools import setup
4+
from setuptools.dist import Distribution
5+
6+
# setuptools plugins considered harmful:
7+
# If build isolation is not in use and setuptools_scm is installed,
8+
# then its file_finders entry point is invoked, which we don't need.
9+
# And with setuptools_scm 8, we get more trouble:
10+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
11+
# LookupError: setuptools-scm was unable to detect version ...
12+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
13+
Distribution._removed = staticmethod(lambda ep: True)
414

515
setup()

pkgs/sage-setup/setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/usr/bin/env python
22

33
from setuptools import setup
4+
from setuptools.dist import Distribution
5+
6+
# setuptools plugins considered harmful:
7+
# If build isolation is not in use and setuptools_scm is installed,
8+
# then its file_finders entry point is invoked, which we don't need.
9+
# And with setuptools_scm 8, we get more trouble:
10+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
11+
# LookupError: setuptools-scm was unable to detect version ...
12+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
13+
Distribution._removed = staticmethod(lambda ep: True)
414

515
setup()

pkgs/sage-sws2rst/setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
from setuptools import setup
2+
from setuptools.dist import Distribution
3+
4+
# setuptools plugins considered harmful:
5+
# If build isolation is not in use and setuptools_scm is installed,
6+
# then its file_finders entry point is invoked, which we don't need.
7+
# And with setuptools_scm 8, we get more trouble:
8+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
9+
# LookupError: setuptools-scm was unable to detect version ...
10+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
11+
Distribution._removed = staticmethod(lambda ep: True)
12+
213
setup()

0 commit comments

Comments
 (0)