mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
112 lines
4.1 KiB
Diff
112 lines
4.1 KiB
Diff
Inverted form of https://github.com/PyO3/setuptools-rust/commit/d7cdf449c1130dc6e710ff8a20f7d0d8d11460b2
|
|
reverted:
|
|
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
|
|
index b2068b1..ac2e52b 100644
|
|
--- a/.github/workflows/ci.yml
|
|
+++ b/.github/workflows/ci.yml
|
|
@@ -208,8 +208,7 @@ jobs:
|
|
- uses: actions/checkout@master
|
|
- name: Build wheels
|
|
run: |
|
|
- echo 'set -ex
|
|
- curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
+ echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
source ~/.cargo/env
|
|
rustup target add ${{ matrix.platform.target }}
|
|
|
|
@@ -220,7 +219,7 @@ jobs:
|
|
python3.9 -m pip install crossenv
|
|
python3.9 -m crossenv "/opt/python/cp39-cp39/bin/python3" --cc $TARGET_CC --cxx $TARGET_CXX --sysroot $TARGET_SYSROOT --env LIBRARY_PATH= --manylinux manylinux1 venv
|
|
. venv/bin/activate
|
|
- build-pip install cffi wheel "setuptools>=62.4"
|
|
+ build-pip install cffi wheel
|
|
cross-expose cffi
|
|
pip install wheel
|
|
pip install -e ../../
|
|
diff --git a/examples/rust_with_cffi/setup.py b/examples/rust_with_cffi/setup.py
|
|
index 6e4b388..6479b15 100644
|
|
--- a/examples/rust_with_cffi/setup.py
|
|
+++ b/examples/rust_with_cffi/setup.py
|
|
@@ -1,4 +1,7 @@
|
|
#!/usr/bin/env python
|
|
+import platform
|
|
+import sys
|
|
+
|
|
from setuptools import setup
|
|
from setuptools_rust import RustExtension
|
|
|
|
diff --git a/pyproject.toml b/pyproject.toml
|
|
index d12f369..cd9c5dc 100644
|
|
--- a/pyproject.toml
|
|
+++ b/pyproject.toml
|
|
@@ -1,5 +1,5 @@
|
|
[build-system]
|
|
-requires = ["setuptools>=62.4"]
|
|
+requires = ["setuptools>=58.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.isort]
|
|
diff --git a/setup.cfg b/setup.cfg
|
|
index c6429df..a3666d8 100644
|
|
--- a/setup.cfg
|
|
+++ b/setup.cfg
|
|
@@ -18,7 +18,6 @@ classifiers =
|
|
Programming Language :: Python :: 3.7
|
|
Programming Language :: Python :: 3.8
|
|
Programming Language :: Python :: 3.9
|
|
- Programming Language :: Python :: 3.10
|
|
Development Status :: 5 - Production/Stable
|
|
Operating System :: POSIX
|
|
Operating System :: MacOS :: MacOS X
|
|
@@ -27,8 +26,8 @@ classifiers =
|
|
[options]
|
|
packages = setuptools_rust
|
|
zip_safe = True
|
|
-install_requires = setuptools>=62.4; semantic_version>=2.8.2,<3; typing_extensions>=3.7.4.3
|
|
-setup_requires = setuptools>=62.4
|
|
+install_requires = setuptools>=58.0; semantic_version>=2.8.2,<3; typing_extensions>=3.7.4.3
|
|
+setup_requires = setuptools>=58.0
|
|
python_requires = >=3.7
|
|
|
|
[options.entry_points]
|
|
diff --git a/setuptools_rust/build.py b/setuptools_rust/build.py
|
|
index decc968..0383784 100644
|
|
--- a/setuptools_rust/build.py
|
|
+++ b/setuptools_rust/build.py
|
|
@@ -9,6 +9,7 @@ import subprocess
|
|
import sys
|
|
import sysconfig
|
|
from distutils import log
|
|
+from distutils.command.build import build as CommandBuild
|
|
from distutils.errors import (
|
|
CompileError,
|
|
DistutilsExecError,
|
|
@@ -20,7 +21,6 @@ from pathlib import Path
|
|
from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, cast
|
|
|
|
import pkg_resources
|
|
-from setuptools.command.build import build as CommandBuild # type: ignore[import]
|
|
from setuptools.command.build_ext import build_ext as CommandBuildExt
|
|
from setuptools.command.build_ext import get_abi3_suffix
|
|
from typing_extensions import Literal
|
|
@@ -75,7 +75,7 @@ class build_rust(RustCommand):
|
|
self.data_dir = self.get_data_dir()
|
|
|
|
if self.plat_name is None:
|
|
- self.plat_name = cast( # type: ignore[no-any-unimported]
|
|
+ self.plat_name = cast(
|
|
CommandBuild, self.get_finalized_command("build")
|
|
).plat_name
|
|
assert isinstance(self.plat_name, str)
|
|
diff --git a/setuptools_rust/setuptools_ext.py b/setuptools_rust/setuptools_ext.py
|
|
index 8ce281e..aafe79f 100644
|
|
--- a/setuptools_rust/setuptools_ext.py
|
|
+++ b/setuptools_rust/setuptools_ext.py
|
|
@@ -3,6 +3,7 @@ import subprocess
|
|
import sysconfig
|
|
from distutils import log
|
|
from distutils.command.clean import clean
|
|
+from pathlib import Path
|
|
from typing import List, Set, Tuple, Type, cast
|
|
|
|
from setuptools.command.build_ext import build_ext
|