Skip to content

Commit 4c2afd4

Browse files
committed
Fix dependencies, and remove optional get_requires_for_build_sdist/wheel hooks
Closes mesonbuildgh-56
1 parent 73e3aee commit 4c2afd4

File tree

2 files changed

+5
-32
lines changed

2 files changed

+5
-32
lines changed

mesonpy/__init__.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@
5151
__version__ = '0.4.0'
5252

5353

54-
class _depstr:
55-
ninja = 'ninja >= 1.10.0'
56-
patchelf_wrapper = 'patchelf-wrapper'
57-
pep621 = 'pep621 >= 0.3.0'
58-
wheel = 'wheel >= 0.36.0' # noqa: F811
59-
60-
6154
_COLORS = {
6255
'cyan': '\33[36m',
6356
'yellow': '\33[93m',
@@ -762,16 +755,6 @@ def _project(config_settings: Optional[Dict[Any, Any]]) -> Iterator[Project]:
762755
yield project
763756

764757

765-
def get_requires_for_build_sdist(
766-
config_settings: Optional[Dict[Any, Any]] = None,
767-
) -> List[str]:
768-
dependencies = []
769-
with _project(config_settings) as project:
770-
if project.pep621:
771-
dependencies.append(_depstr.pep621)
772-
return dependencies
773-
774-
775758
def build_sdist(
776759
sdist_directory: str,
777760
config_settings: Optional[Dict[Any, Any]] = None,
@@ -783,18 +766,6 @@ def build_sdist(
783766
return project.sdist(out).name
784767

785768

786-
def get_requires_for_build_wheel(
787-
config_settings: Optional[Dict[str, str]] = None,
788-
) -> List[str]:
789-
dependencies = [_depstr.wheel, _depstr.ninja]
790-
with _project(config_settings) as project:
791-
if not project.is_pure and platform.system() == 'Linux':
792-
dependencies.append(_depstr.patchelf_wrapper)
793-
if project.pep621:
794-
dependencies.append(_depstr.pep621)
795-
return dependencies
796-
797-
798769
def build_wheel(
799770
wheel_directory: str,
800771
config_settings: Optional[Dict[Any, Any]] = None,

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ classifiers = [
2727
dependencies = [
2828
'colorama; os_name == "nt"',
2929
'meson>=0.60.0',
30-
'ninja',
30+
'ninja >= 1.10.0',
31+
'pep621 >= 0.4.0',
32+
'patchelf-wrapper, sys_platform == "linux"', # FIXME: broken package, see gh-52
33+
'wheel >= 0.36.0',
3134
'tomli>=1.0.0',
3235
'typing-extensions>=3.7.4; python_version<"3.8"',
3336
]
@@ -38,8 +41,7 @@ test = [
3841
'pytest-cov',
3942
'pytest-mock',
4043
'GitPython',
41-
'auditwheel',
42-
'pep621 >= 0.4.0',
44+
'auditwheel', # unused as of now
4345
]
4446
docs = [
4547
'furo>=2021.08.31',

0 commit comments

Comments
 (0)