setuptools-rust 1.5.2__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.bumpversion.cfg +1 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.github/workflows/ci.yml +37 -50
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.github/workflows/python-publish.yml +2 -2
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/CHANGELOG.md +8 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/PKG-INFO +2 -2
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/conf.py +0 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/Cargo.lock +12 -12
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/Cargo.toml +1 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/Cargo.lock +12 -12
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/Cargo.toml +1 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/Cargo.lock +12 -12
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/Cargo.toml +1 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setup.cfg +6 -3
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/build.py +48 -10
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/command.py +1 -2
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/setuptools_ext.py +2 -4
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/version.py +1 -1
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/PKG-INFO +2 -2
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.gitattributes +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.github/dependabot.yml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.gitignore +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/.readthedocs.yaml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/LICENSE +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/README.md +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/Makefile +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/README.md +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/building_wheels.md +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/index.md +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/make.bat +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/reference.rst +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/docs/requirements.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/emscripten/.gitignore +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/emscripten/_sysconfigdata__emscripten_wasm32-emscripten.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/emscripten/emcc_wrapper.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/emscripten/pyo3_config.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/emscripten/runner.js +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/Cargo.lock +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/Cargo.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/hello_world/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/pytest.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/src/main.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/Cargo.lock +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/Cargo.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/hello_world/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/pytest.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/src/main.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/.github/workflows/upload.yml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/README.md +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/build-wheels.sh +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/html_py_ever/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/pytest.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/requirements.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/setup.cfg +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/src/lib.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/src/main.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/conftest.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/empty.html +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/monty-python.html +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/python.html +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/run_all.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/rust.html +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/small.html +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/test_parsing.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/test_selector.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/.cargo/config.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/Cross.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/Dockerfile +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/namespace_package/python/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/pytest.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/src/lib.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/tests/test_namespace_package.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/MANIFEST.in +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/cffi_module.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/pytest.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/rust_with_cffi/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/src/lib.rs +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/tests/test_rust_with_cffi.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/mypy.ini +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/noxfile.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/pyproject.toml +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setup.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/__init__.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/_utils.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/clean.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/extension.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/py.typed +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust/rustc_info.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/SOURCES.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/dependency_links.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/entry_points.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/requires.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/top_level.txt +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/zip-safe +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/tests/test_build.py +0 -0
- {setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/tests/test_extension.py +0 -0
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
- uses: actions/checkout@v3
|
|
17
17
|
|
|
18
18
|
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
-
uses: actions/setup-python@
|
|
19
|
+
uses: actions/setup-python@v4
|
|
20
20
|
with:
|
|
21
21
|
python-version: "3.x"
|
|
22
22
|
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
- uses: actions/checkout@v3
|
|
31
31
|
|
|
32
32
|
- name: Set up Python ${{ matrix.python-version }}
|
|
33
|
-
uses: actions/setup-python@
|
|
33
|
+
uses: actions/setup-python@v4
|
|
34
34
|
with:
|
|
35
35
|
python-version: "3.x"
|
|
36
36
|
|
|
@@ -44,16 +44,12 @@ jobs:
|
|
|
44
44
|
- uses: actions/checkout@v3
|
|
45
45
|
|
|
46
46
|
- name: Set up Python ${{ matrix.python-version }}
|
|
47
|
-
uses: actions/setup-python@
|
|
47
|
+
uses: actions/setup-python@v4
|
|
48
48
|
with:
|
|
49
49
|
python-version: "3.x"
|
|
50
50
|
|
|
51
51
|
- name: Install Rust toolchain
|
|
52
|
-
uses:
|
|
53
|
-
with:
|
|
54
|
-
toolchain: stable
|
|
55
|
-
profile: minimal
|
|
56
|
-
default: true
|
|
52
|
+
uses: dtolnay/rust-toolchain@stable
|
|
57
53
|
|
|
58
54
|
- run: pip install nox
|
|
59
55
|
|
|
@@ -66,7 +62,7 @@ jobs:
|
|
|
66
62
|
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
|
|
67
63
|
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
|
|
68
64
|
matrix:
|
|
69
|
-
python-version: ["3.7", "3.8", "3.9", "3.10", pypy-3.7, pypy-3.8]
|
|
65
|
+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", pypy-3.7, pypy-3.8, pypy-3.9]
|
|
70
66
|
platform: [
|
|
71
67
|
{ os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
|
|
72
68
|
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
|
|
@@ -80,23 +76,23 @@ jobs:
|
|
|
80
76
|
# No 32-bit pypy 3.8 on Windows
|
|
81
77
|
- python-version: pypy-3.8
|
|
82
78
|
platform: { os: "windows-latest", python-architecture: "x86" }
|
|
79
|
+
# No 32-bit pypy 3.9 on Windows
|
|
80
|
+
- python-version: pypy-3.9
|
|
81
|
+
platform: { os: "windows-latest", python-architecture: "x86" }
|
|
83
82
|
|
|
84
83
|
steps:
|
|
85
84
|
- uses: actions/checkout@v3
|
|
86
85
|
|
|
87
86
|
- name: Set up Python ${{ matrix.python-version }}
|
|
88
|
-
uses: actions/setup-python@
|
|
87
|
+
uses: actions/setup-python@v4
|
|
89
88
|
with:
|
|
90
89
|
python-version: ${{ matrix.python-version }}
|
|
91
90
|
architecture: ${{ matrix.platform.python-architecture }}
|
|
92
91
|
|
|
93
92
|
- name: Install Rust toolchain
|
|
94
|
-
uses:
|
|
93
|
+
uses: dtolnay/rust-toolchain@stable
|
|
95
94
|
with:
|
|
96
|
-
|
|
97
|
-
target: ${{ matrix.platform.rust-target }}
|
|
98
|
-
profile: minimal
|
|
99
|
-
default: true
|
|
95
|
+
targets: ${{ matrix.platform.rust-target }}
|
|
100
96
|
|
|
101
97
|
- name: Install Rust aarch64-apple-darwin target
|
|
102
98
|
if: matrix.platform.os == 'macos-latest'
|
|
@@ -148,15 +144,11 @@ jobs:
|
|
|
148
144
|
steps:
|
|
149
145
|
- uses: actions/checkout@master
|
|
150
146
|
- name: Setup python
|
|
151
|
-
uses: actions/setup-python@
|
|
147
|
+
uses: actions/setup-python@v4
|
|
152
148
|
with:
|
|
153
149
|
python-version: 3.9
|
|
154
150
|
|
|
155
|
-
- uses:
|
|
156
|
-
with:
|
|
157
|
-
profile: minimal
|
|
158
|
-
toolchain: stable
|
|
159
|
-
override: true
|
|
151
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
160
152
|
|
|
161
153
|
- name: Install Rust aarch64-apple-darwin target
|
|
162
154
|
if: matrix.os == 'macos-latest'
|
|
@@ -168,6 +160,7 @@ jobs:
|
|
|
168
160
|
- name: Build an abi3 wheel
|
|
169
161
|
shell: bash
|
|
170
162
|
run: |
|
|
163
|
+
set -e
|
|
171
164
|
cd examples/rust_with_cffi/
|
|
172
165
|
python --version
|
|
173
166
|
pip install -U wheel
|
|
@@ -180,13 +173,14 @@ jobs:
|
|
|
180
173
|
# Now we switch to a differnet Python version and ensure we can install
|
|
181
174
|
# the wheel we just built.
|
|
182
175
|
- name: Setup python
|
|
183
|
-
uses: actions/setup-python@
|
|
176
|
+
uses: actions/setup-python@v4
|
|
184
177
|
with:
|
|
185
178
|
python-version: "3.10"
|
|
186
179
|
|
|
187
180
|
- name: Install abi3 wheel and run tests
|
|
188
181
|
shell: bash
|
|
189
182
|
run: |
|
|
183
|
+
set -e
|
|
190
184
|
cd examples/
|
|
191
185
|
pip install -U wheel
|
|
192
186
|
python --version
|
|
@@ -194,6 +188,14 @@ jobs:
|
|
|
194
188
|
python -c "from rust_with_cffi import rust; assert rust.rust_func() == 14"
|
|
195
189
|
python -c "from rust_with_cffi.cffi import lib; assert lib.cffi_func() == 15"
|
|
196
190
|
|
|
191
|
+
- name: Run abi3audit
|
|
192
|
+
shell: bash
|
|
193
|
+
run: |
|
|
194
|
+
set -e
|
|
195
|
+
pip install abi3audit
|
|
196
|
+
cd examples/
|
|
197
|
+
abi3audit rust_with_cffi/dist/rust_with_cffi*.whl
|
|
198
|
+
|
|
197
199
|
test-crossenv:
|
|
198
200
|
runs-on: ubuntu-latest
|
|
199
201
|
strategy:
|
|
@@ -251,14 +253,10 @@ jobs:
|
|
|
251
253
|
steps:
|
|
252
254
|
- uses: actions/checkout@v3
|
|
253
255
|
- name: Setup python
|
|
254
|
-
uses: actions/setup-python@
|
|
256
|
+
uses: actions/setup-python@v4
|
|
255
257
|
with:
|
|
256
258
|
python-version: 3.8
|
|
257
|
-
- uses:
|
|
258
|
-
with:
|
|
259
|
-
profile: minimal
|
|
260
|
-
toolchain: stable
|
|
261
|
-
override: true
|
|
259
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
262
260
|
- name: Install cross
|
|
263
261
|
uses: taiki-e/install-action@v1
|
|
264
262
|
with:
|
|
@@ -298,15 +296,12 @@ jobs:
|
|
|
298
296
|
steps:
|
|
299
297
|
- uses: actions/checkout@v3
|
|
300
298
|
- name: Setup python
|
|
301
|
-
uses: actions/setup-python@
|
|
299
|
+
uses: actions/setup-python@v4
|
|
302
300
|
with:
|
|
303
301
|
python-version: 3.8
|
|
304
|
-
- uses:
|
|
302
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
305
303
|
with:
|
|
306
|
-
|
|
307
|
-
toolchain: stable
|
|
308
|
-
target: aarch64-unknown-linux-gnu
|
|
309
|
-
override: true
|
|
304
|
+
targets: aarch64-unknown-linux-gnu
|
|
310
305
|
- name: Install cargo-zigbuild
|
|
311
306
|
run: |
|
|
312
307
|
python3 -m pip install cargo-zigbuild
|
|
@@ -345,12 +340,9 @@ jobs:
|
|
|
345
340
|
runs-on: macos-latest
|
|
346
341
|
steps:
|
|
347
342
|
- uses: actions/checkout@v3
|
|
348
|
-
- uses:
|
|
343
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
349
344
|
with:
|
|
350
|
-
|
|
351
|
-
toolchain: stable
|
|
352
|
-
target: aarch64-apple-darwin
|
|
353
|
-
override: true
|
|
345
|
+
targets: aarch64-apple-darwin
|
|
354
346
|
- uses: pypa/cibuildwheel@v2.3.1
|
|
355
347
|
env:
|
|
356
348
|
CIBW_BUILD: cp39-*
|
|
@@ -384,11 +376,9 @@ jobs:
|
|
|
384
376
|
mingw-w64-${{ matrix.arch }}-openssl
|
|
385
377
|
mingw-w64-${{ matrix.arch }}-toolchain
|
|
386
378
|
|
|
387
|
-
- uses:
|
|
379
|
+
- uses: dtolnay/rust-toolchain@master
|
|
388
380
|
with:
|
|
389
|
-
profile: minimal
|
|
390
381
|
toolchain: stable-${{ matrix.rust_target }}
|
|
391
|
-
default: true
|
|
392
382
|
|
|
393
383
|
- name: Install test dependencies
|
|
394
384
|
shell: msys2 {0}
|
|
@@ -419,24 +409,21 @@ jobs:
|
|
|
419
409
|
cd node_modules/pyodide/
|
|
420
410
|
node ../prettier/bin-prettier.js -w pyodide.asm.js
|
|
421
411
|
EMSCRIPTEN_VERSION=$(node -p "require('./repodata.json').info.platform.split('_').slice(1).join('.')")
|
|
422
|
-
PYTHON_VERSION=3.10
|
|
412
|
+
PYTHON_VERSION=3.10
|
|
423
413
|
|
|
424
414
|
echo "PYODIDE_VERSION=$PYODIDE_VERSION" >> $GITHUB_ENV
|
|
425
415
|
echo "EMSCRIPTEN_VERSION=$EMSCRIPTEN_VERSION" >> $GITHUB_ENV
|
|
426
416
|
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
|
|
427
417
|
echo "ORIG_PATH=$PATH" >> $GITHUB_ENV
|
|
428
|
-
- uses:
|
|
418
|
+
- uses: dtolnay/rust-toolchain@nightly
|
|
429
419
|
with:
|
|
430
|
-
profile: minimal
|
|
431
|
-
toolchain: nightly
|
|
432
420
|
components: rust-src
|
|
433
|
-
|
|
434
|
-
override: true
|
|
421
|
+
targets: wasm32-unknown-emscripten
|
|
435
422
|
- uses: mymindstorm/setup-emsdk@v11
|
|
436
423
|
with:
|
|
437
424
|
version: ${{env.EMSCRIPTEN_VERSION}}
|
|
438
425
|
actions-cache-folder: emsdk-cache
|
|
439
|
-
- uses: actions/setup-python@
|
|
426
|
+
- uses: actions/setup-python@v4
|
|
440
427
|
id: setup-python
|
|
441
428
|
with:
|
|
442
429
|
python-version: ${{env.PYTHON_VERSION}}
|
|
@@ -446,7 +433,7 @@ jobs:
|
|
|
446
433
|
path: |
|
|
447
434
|
tests/pyodide
|
|
448
435
|
key: ${{ hashFiles('tests/*.js') }} - ${{ hashFiles('noxfile.py') }} - ${{ steps.setup-python.outputs.python-path }}
|
|
449
|
-
- uses: Swatinem/rust-cache@
|
|
436
|
+
- uses: Swatinem/rust-cache@v2
|
|
450
437
|
- name: Test
|
|
451
438
|
run: |
|
|
452
439
|
export PATH=$ORIG_PATH:$PATH
|
|
@@ -14,12 +14,12 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
18
|
with:
|
|
19
19
|
# Fetch all history so that setuptools_scm works correctly
|
|
20
20
|
fetch-depth: 0
|
|
21
21
|
- name: Set up Python
|
|
22
|
-
uses: actions/setup-python@
|
|
22
|
+
uses: actions/setup-python@v4
|
|
23
23
|
with:
|
|
24
24
|
python-version: '3.x'
|
|
25
25
|
- name: Install dependencies
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.0 (2023-04-27)
|
|
4
|
+
### Changed
|
|
5
|
+
- Prefer passing `--crate-type` option to cargo if "toolchain >= 1.64". [#322](https://github.com/PyO3/setuptools-rust/pull/322)
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Fix a bug where rebuilding the library would cause any running processes using it to segfault. [#295](https://github.com/PyO3/setuptools-rust/pull/295)
|
|
9
|
+
- Fix `setup.cfg` format for compatibility with "poetry==1.4.0". [#319](https://github.com/PyO3/setuptools-rust/pull/319)
|
|
10
|
+
|
|
3
11
|
## 1.5.2 (2022-09-19)
|
|
4
12
|
### Fixed
|
|
5
13
|
- Fix regression in `dylib` build artifacts not being found since 1.5.0. [#290](https://github.com/PyO3/setuptools-rust/pull/290)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: setuptools-rust
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Setuptools Rust extension plugin
|
|
5
5
|
Home-page: https://github.com/PyO3/setuptools-rust
|
|
6
6
|
Author: Nikolay Kim
|
|
@@ -11,11 +11,11 @@ Classifier: Topic :: Software Development :: Version Control
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Development Status :: 5 - Production/Stable
|
|
20
20
|
Classifier: Operating System :: POSIX
|
|
21
21
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
@@ -234,9 +234,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
|
|
|
234
234
|
|
|
235
235
|
[[package]]
|
|
236
236
|
name = "memoffset"
|
|
237
|
-
version = "0.
|
|
237
|
+
version = "0.8.0"
|
|
238
238
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
|
-
checksum = "
|
|
239
|
+
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
|
|
240
240
|
dependencies = [
|
|
241
241
|
"autocfg",
|
|
242
242
|
]
|
|
@@ -376,9 +376,9 @@ dependencies = [
|
|
|
376
376
|
|
|
377
377
|
[[package]]
|
|
378
378
|
name = "pyo3"
|
|
379
|
-
version = "0.
|
|
379
|
+
version = "0.18.2"
|
|
380
380
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
381
|
-
checksum = "
|
|
381
|
+
checksum = "cfb848f80438f926a9ebddf0a539ed6065434fd7aae03a89312a9821f81b8501"
|
|
382
382
|
dependencies = [
|
|
383
383
|
"cfg-if",
|
|
384
384
|
"indoc",
|
|
@@ -393,9 +393,9 @@ dependencies = [
|
|
|
393
393
|
|
|
394
394
|
[[package]]
|
|
395
395
|
name = "pyo3-build-config"
|
|
396
|
-
version = "0.
|
|
396
|
+
version = "0.18.2"
|
|
397
397
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
398
|
-
checksum = "
|
|
398
|
+
checksum = "98a42e7f42e917ce6664c832d5eee481ad514c98250c49e0b03b20593e2c7ed0"
|
|
399
399
|
dependencies = [
|
|
400
400
|
"once_cell",
|
|
401
401
|
"target-lexicon",
|
|
@@ -403,9 +403,9 @@ dependencies = [
|
|
|
403
403
|
|
|
404
404
|
[[package]]
|
|
405
405
|
name = "pyo3-ffi"
|
|
406
|
-
version = "0.
|
|
406
|
+
version = "0.18.2"
|
|
407
407
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
408
|
-
checksum = "
|
|
408
|
+
checksum = "a0707f0ab26826fe4ccd59b69106e9df5e12d097457c7b8f9c0fd1d2743eec4d"
|
|
409
409
|
dependencies = [
|
|
410
410
|
"libc",
|
|
411
411
|
"pyo3-build-config",
|
|
@@ -413,9 +413,9 @@ dependencies = [
|
|
|
413
413
|
|
|
414
414
|
[[package]]
|
|
415
415
|
name = "pyo3-macros"
|
|
416
|
-
version = "0.
|
|
416
|
+
version = "0.18.2"
|
|
417
417
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
418
|
-
checksum = "
|
|
418
|
+
checksum = "978d18e61465ecd389e1f235ff5a467146dc4e3c3968b90d274fe73a5dd4a438"
|
|
419
419
|
dependencies = [
|
|
420
420
|
"proc-macro2",
|
|
421
421
|
"pyo3-macros-backend",
|
|
@@ -425,9 +425,9 @@ dependencies = [
|
|
|
425
425
|
|
|
426
426
|
[[package]]
|
|
427
427
|
name = "pyo3-macros-backend"
|
|
428
|
-
version = "0.
|
|
428
|
+
version = "0.18.2"
|
|
429
429
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
-
checksum = "
|
|
430
|
+
checksum = "8e0e1128f85ce3fca66e435e08aa2089a2689c1c48ce97803e13f63124058462"
|
|
431
431
|
dependencies = [
|
|
432
432
|
"proc-macro2",
|
|
433
433
|
"quote",
|
|
@@ -55,9 +55,9 @@ dependencies = [
|
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "memoffset"
|
|
58
|
-
version = "0.
|
|
58
|
+
version = "0.8.0"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
60
|
+
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
|
|
61
61
|
dependencies = [
|
|
62
62
|
"autocfg",
|
|
63
63
|
]
|
|
@@ -111,9 +111,9 @@ dependencies = [
|
|
|
111
111
|
|
|
112
112
|
[[package]]
|
|
113
113
|
name = "pyo3"
|
|
114
|
-
version = "0.
|
|
114
|
+
version = "0.18.2"
|
|
115
115
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
-
checksum = "
|
|
116
|
+
checksum = "cfb848f80438f926a9ebddf0a539ed6065434fd7aae03a89312a9821f81b8501"
|
|
117
117
|
dependencies = [
|
|
118
118
|
"cfg-if",
|
|
119
119
|
"indoc",
|
|
@@ -128,9 +128,9 @@ dependencies = [
|
|
|
128
128
|
|
|
129
129
|
[[package]]
|
|
130
130
|
name = "pyo3-build-config"
|
|
131
|
-
version = "0.
|
|
131
|
+
version = "0.18.2"
|
|
132
132
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
-
checksum = "
|
|
133
|
+
checksum = "98a42e7f42e917ce6664c832d5eee481ad514c98250c49e0b03b20593e2c7ed0"
|
|
134
134
|
dependencies = [
|
|
135
135
|
"once_cell",
|
|
136
136
|
"target-lexicon",
|
|
@@ -138,9 +138,9 @@ dependencies = [
|
|
|
138
138
|
|
|
139
139
|
[[package]]
|
|
140
140
|
name = "pyo3-ffi"
|
|
141
|
-
version = "0.
|
|
141
|
+
version = "0.18.2"
|
|
142
142
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
-
checksum = "
|
|
143
|
+
checksum = "a0707f0ab26826fe4ccd59b69106e9df5e12d097457c7b8f9c0fd1d2743eec4d"
|
|
144
144
|
dependencies = [
|
|
145
145
|
"libc",
|
|
146
146
|
"pyo3-build-config",
|
|
@@ -148,9 +148,9 @@ dependencies = [
|
|
|
148
148
|
|
|
149
149
|
[[package]]
|
|
150
150
|
name = "pyo3-macros"
|
|
151
|
-
version = "0.
|
|
151
|
+
version = "0.18.2"
|
|
152
152
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
153
|
-
checksum = "
|
|
153
|
+
checksum = "978d18e61465ecd389e1f235ff5a467146dc4e3c3968b90d274fe73a5dd4a438"
|
|
154
154
|
dependencies = [
|
|
155
155
|
"proc-macro2",
|
|
156
156
|
"pyo3-macros-backend",
|
|
@@ -160,9 +160,9 @@ dependencies = [
|
|
|
160
160
|
|
|
161
161
|
[[package]]
|
|
162
162
|
name = "pyo3-macros-backend"
|
|
163
|
-
version = "0.
|
|
163
|
+
version = "0.18.2"
|
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
-
checksum = "
|
|
165
|
+
checksum = "8e0e1128f85ce3fca66e435e08aa2089a2689c1c48ce97803e13f63124058462"
|
|
166
166
|
dependencies = [
|
|
167
167
|
"proc-macro2",
|
|
168
168
|
"quote",
|
|
@@ -55,9 +55,9 @@ dependencies = [
|
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "memoffset"
|
|
58
|
-
version = "0.
|
|
58
|
+
version = "0.8.0"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
60
|
+
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
|
|
61
61
|
dependencies = [
|
|
62
62
|
"autocfg",
|
|
63
63
|
]
|
|
@@ -104,9 +104,9 @@ dependencies = [
|
|
|
104
104
|
|
|
105
105
|
[[package]]
|
|
106
106
|
name = "pyo3"
|
|
107
|
-
version = "0.
|
|
107
|
+
version = "0.18.2"
|
|
108
108
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
-
checksum = "
|
|
109
|
+
checksum = "cfb848f80438f926a9ebddf0a539ed6065434fd7aae03a89312a9821f81b8501"
|
|
110
110
|
dependencies = [
|
|
111
111
|
"cfg-if",
|
|
112
112
|
"indoc",
|
|
@@ -121,9 +121,9 @@ dependencies = [
|
|
|
121
121
|
|
|
122
122
|
[[package]]
|
|
123
123
|
name = "pyo3-build-config"
|
|
124
|
-
version = "0.
|
|
124
|
+
version = "0.18.2"
|
|
125
125
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
126
|
+
checksum = "98a42e7f42e917ce6664c832d5eee481ad514c98250c49e0b03b20593e2c7ed0"
|
|
127
127
|
dependencies = [
|
|
128
128
|
"once_cell",
|
|
129
129
|
"target-lexicon",
|
|
@@ -131,9 +131,9 @@ dependencies = [
|
|
|
131
131
|
|
|
132
132
|
[[package]]
|
|
133
133
|
name = "pyo3-ffi"
|
|
134
|
-
version = "0.
|
|
134
|
+
version = "0.18.2"
|
|
135
135
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
|
-
checksum = "
|
|
136
|
+
checksum = "a0707f0ab26826fe4ccd59b69106e9df5e12d097457c7b8f9c0fd1d2743eec4d"
|
|
137
137
|
dependencies = [
|
|
138
138
|
"libc",
|
|
139
139
|
"pyo3-build-config",
|
|
@@ -141,9 +141,9 @@ dependencies = [
|
|
|
141
141
|
|
|
142
142
|
[[package]]
|
|
143
143
|
name = "pyo3-macros"
|
|
144
|
-
version = "0.
|
|
144
|
+
version = "0.18.2"
|
|
145
145
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
-
checksum = "
|
|
146
|
+
checksum = "978d18e61465ecd389e1f235ff5a467146dc4e3c3968b90d274fe73a5dd4a438"
|
|
147
147
|
dependencies = [
|
|
148
148
|
"proc-macro2",
|
|
149
149
|
"pyo3-macros-backend",
|
|
@@ -153,9 +153,9 @@ dependencies = [
|
|
|
153
153
|
|
|
154
154
|
[[package]]
|
|
155
155
|
name = "pyo3-macros-backend"
|
|
156
|
-
version = "0.
|
|
156
|
+
version = "0.18.2"
|
|
157
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
158
|
-
checksum = "
|
|
158
|
+
checksum = "8e0e1128f85ce3fca66e435e08aa2089a2689c1c48ce97803e13f63124058462"
|
|
159
159
|
dependencies = [
|
|
160
160
|
"proc-macro2",
|
|
161
161
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = setuptools-rust
|
|
3
|
-
version = 1.
|
|
3
|
+
version = 1.6.0
|
|
4
4
|
author = Nikolay Kim
|
|
5
5
|
author_email = fafhrd91@gmail.com
|
|
6
6
|
license = MIT
|
|
@@ -14,11 +14,11 @@ classifiers =
|
|
|
14
14
|
License :: OSI Approved :: MIT License
|
|
15
15
|
Intended Audience :: Developers
|
|
16
16
|
Programming Language :: Python :: 3
|
|
17
|
-
Programming Language :: Python :: 3.6
|
|
18
17
|
Programming Language :: Python :: 3.7
|
|
19
18
|
Programming Language :: Python :: 3.8
|
|
20
19
|
Programming Language :: Python :: 3.9
|
|
21
20
|
Programming Language :: Python :: 3.10
|
|
21
|
+
Programming Language :: Python :: 3.11
|
|
22
22
|
Development Status :: 5 - Production/Stable
|
|
23
23
|
Operating System :: POSIX
|
|
24
24
|
Operating System :: MacOS :: MacOS X
|
|
@@ -27,7 +27,10 @@ classifiers =
|
|
|
27
27
|
[options]
|
|
28
28
|
packages = setuptools_rust
|
|
29
29
|
zip_safe = True
|
|
30
|
-
install_requires =
|
|
30
|
+
install_requires =
|
|
31
|
+
setuptools>=62.4
|
|
32
|
+
semantic_version>=2.8.2,<3
|
|
33
|
+
typing_extensions>=3.7.4.3
|
|
31
34
|
setup_requires = setuptools>=62.4
|
|
32
35
|
python_requires = >=3.7
|
|
33
36
|
|
|
@@ -20,6 +20,7 @@ from pathlib import Path
|
|
|
20
20
|
from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, cast
|
|
21
21
|
|
|
22
22
|
import pkg_resources
|
|
23
|
+
from semantic_version import Version
|
|
23
24
|
from setuptools.command.build import build as CommandBuild # type: ignore[import]
|
|
24
25
|
from setuptools.command.build_ext import build_ext as CommandBuildExt
|
|
25
26
|
from setuptools.command.build_ext import get_abi3_suffix
|
|
@@ -28,7 +29,21 @@ from typing_extensions import Literal
|
|
|
28
29
|
from ._utils import format_called_process_error
|
|
29
30
|
from .command import RustCommand
|
|
30
31
|
from .extension import Binding, RustBin, RustExtension, Strip
|
|
31
|
-
from .rustc_info import
|
|
32
|
+
from .rustc_info import (
|
|
33
|
+
get_rust_host,
|
|
34
|
+
get_rust_target_list,
|
|
35
|
+
get_rust_version,
|
|
36
|
+
get_rustc_cfgs,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _check_cargo_supports_crate_type_option() -> bool:
|
|
41
|
+
version = get_rust_version()
|
|
42
|
+
|
|
43
|
+
if version is None:
|
|
44
|
+
return False
|
|
45
|
+
|
|
46
|
+
return version.major > 1 or (version.major == 1 and version.minor >= 64) # type: ignore
|
|
32
47
|
|
|
33
48
|
|
|
34
49
|
class build_rust(RustCommand):
|
|
@@ -93,8 +108,10 @@ class build_rust(RustCommand):
|
|
|
93
108
|
|
|
94
109
|
def get_data_dir(self) -> str:
|
|
95
110
|
components = (
|
|
96
|
-
pkg_resources.safe_name(self.distribution.get_name()).replace("-", "_"),
|
|
97
|
-
pkg_resources.safe_version(self.distribution.get_version()).replace(
|
|
111
|
+
pkg_resources.safe_name(self.distribution.get_name()).replace("-", "_"),
|
|
112
|
+
pkg_resources.safe_version(self.distribution.get_version()).replace(
|
|
113
|
+
"-", "_"
|
|
114
|
+
),
|
|
98
115
|
)
|
|
99
116
|
if self.build_number:
|
|
100
117
|
components += (self.build_number,)
|
|
@@ -130,7 +147,6 @@ class build_rust(RustCommand):
|
|
|
130
147
|
def build_extension(
|
|
131
148
|
self, ext: RustExtension, forced_target_triple: Optional[str] = None
|
|
132
149
|
) -> List["_BuiltModule"]:
|
|
133
|
-
|
|
134
150
|
target_triple = self._detect_rust_target(forced_target_triple)
|
|
135
151
|
rustc_cfgs = get_rustc_cfgs(target_triple)
|
|
136
152
|
|
|
@@ -143,6 +159,7 @@ class build_rust(RustCommand):
|
|
|
143
159
|
|
|
144
160
|
quiet = self.qbuild or ext.quiet
|
|
145
161
|
debug = self._is_debug_build(ext)
|
|
162
|
+
use_cargo_crate_type = _check_cargo_supports_crate_type_option()
|
|
146
163
|
|
|
147
164
|
cargo_args = self._cargo_args(
|
|
148
165
|
ext=ext, target_triple=target_triple, release=not debug, quiet=quiet
|
|
@@ -161,11 +178,18 @@ class build_rust(RustCommand):
|
|
|
161
178
|
]
|
|
162
179
|
|
|
163
180
|
else:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
181
|
+
# If toolchain >= 1.64.0, use '--crate-type' option of cargo.
|
|
182
|
+
# See https://github.com/PyO3/setuptools-rust/issues/320
|
|
183
|
+
if use_cargo_crate_type:
|
|
184
|
+
rustc_args = [
|
|
185
|
+
*ext.rustc_flags,
|
|
186
|
+
]
|
|
187
|
+
else:
|
|
188
|
+
rustc_args = [
|
|
189
|
+
"--crate-type",
|
|
190
|
+
"cdylib",
|
|
191
|
+
*ext.rustc_flags,
|
|
192
|
+
]
|
|
169
193
|
|
|
170
194
|
# OSX requires special linker arguments
|
|
171
195
|
if rustc_cfgs.get("target_os") == "macos":
|
|
@@ -190,6 +214,9 @@ class build_rust(RustCommand):
|
|
|
190
214
|
):
|
|
191
215
|
rustc_args.extend(["-C", f"link-args=-sSIDE_MODULE=2 -sWASM_BIGINT"])
|
|
192
216
|
|
|
217
|
+
if use_cargo_crate_type and "--crate-type" not in cargo_args:
|
|
218
|
+
cargo_args.extend(["--crate-type", "cdylib"])
|
|
219
|
+
|
|
193
220
|
command = [
|
|
194
221
|
self.cargo,
|
|
195
222
|
"rustc",
|
|
@@ -345,7 +372,18 @@ class build_rust(RustCommand):
|
|
|
345
372
|
os.makedirs(os.path.dirname(ext_path), exist_ok=True)
|
|
346
373
|
|
|
347
374
|
log.info("Copying rust artifact from %s to %s", dylib_path, ext_path)
|
|
348
|
-
|
|
375
|
+
|
|
376
|
+
# We want to atomically replace any existing library file. We can't
|
|
377
|
+
# just copy the new library directly on top of the old one as that
|
|
378
|
+
# causes the existing library to be modified (rather the replaced).
|
|
379
|
+
# This means that any process that currently uses the shared library
|
|
380
|
+
# will see it modified and likely segfault.
|
|
381
|
+
#
|
|
382
|
+
# We first copy the file to the same directory, as `os.rename`
|
|
383
|
+
# doesn't work across file system boundaries.
|
|
384
|
+
temp_ext_path = ext_path + "~"
|
|
385
|
+
shutil.copyfile(dylib_path, temp_ext_path)
|
|
386
|
+
os.replace(temp_ext_path, ext_path)
|
|
349
387
|
|
|
350
388
|
if sys.platform != "win32" and not debug_build:
|
|
351
389
|
args = []
|
|
@@ -36,8 +36,7 @@ class RustCommand(Command, ABC):
|
|
|
36
36
|
"expected list of RustExtension objects for rust_extensions "
|
|
37
37
|
f"argument to setup(), got `{ty}`"
|
|
38
38
|
)
|
|
39
|
-
for
|
|
40
|
-
|
|
39
|
+
for i, extension in enumerate(extensions):
|
|
41
40
|
if not isinstance(extension, RustExtension):
|
|
42
41
|
ty = type(extension)
|
|
43
42
|
raise ValueError(
|
|
@@ -275,10 +275,8 @@ def rust_extensions(
|
|
|
275
275
|
has_rust_extensions = len(value) > 0
|
|
276
276
|
|
|
277
277
|
# Monkey patch has_ext_modules to include Rust extensions.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
orig_has_ext_modules = dist.has_ext_modules # type: ignore[attr-defined]
|
|
281
|
-
dist.has_ext_modules = lambda: (orig_has_ext_modules() or has_rust_extensions) # type: ignore[attr-defined]
|
|
278
|
+
orig_has_ext_modules = dist.has_ext_modules
|
|
279
|
+
dist.has_ext_modules = lambda: (orig_has_ext_modules() or has_rust_extensions) # type: ignore[method-assign]
|
|
282
280
|
|
|
283
281
|
if has_rust_extensions:
|
|
284
282
|
add_rust_extension(dist)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: setuptools-rust
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Setuptools Rust extension plugin
|
|
5
5
|
Home-page: https://github.com/PyO3/setuptools-rust
|
|
6
6
|
Author: Nikolay Kim
|
|
@@ -11,11 +11,11 @@ Classifier: Topic :: Software Development :: Version Control
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Development Status :: 5 - Production/Stable
|
|
20
20
|
Classifier: Operating System :: POSIX
|
|
21
21
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world/hello_world/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/hello-world-script/hello_world/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/.github/workflows/upload.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/html_py_ever/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/monty-python.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/html-py-ever/tests/test_selector.py
RENAMED
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/namespace_package/.cargo/config.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/rust_with_cffi/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/examples/rust_with_cffi/tests/test_rust_with_cffi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{setuptools-rust-1.5.2 → setuptools-rust-1.6.0}/setuptools_rust.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|