Comments (5)
@ManifoldFR you might want to try this for point-process-rust
from maturin.
Created a test branch here.
Here's the output from my mac:
> pyo3-pack build ✘
Found Python 2.7m at python2.7, Python 3.6m at python3.6, Python 3.7m at python3.7
Building the crate for Python 2.7m at python2.7
Finished release [optimized + debuginfo] target(s) in 0.08s
Error: ElfkitError(InvalidMagic)
Failed to ensure manylinux compliance
target/wheels
is empty.
Seems like I'm running into this error.
Do I need to install any additional tooling to make it work on macOS?
Can I get rid of setuptools-rust entirely (also in setup.py
)?
from maturin.
Oh well, it shouldn't check for manylinux compliancy on mac 😅 I've fixed it in e6a2de8.
Can I get rid of setuptools-rust entirely (also in setup.py)?
Yes, pyo3-pack is zero configuration and needs only a rust crate. Now that you already have a setuptools configuration it's imho a good idea to keep it as pyo3-pack won't be able to build source distribution for a while (those get compiled when installed, so package can be installed on python versions and platforms for which there are no wheels. The culprit in this case is pip though. See #2) I've tried to make this a bit clearer in the readme.
from maturin.
After your fix it works!
Here's the output from my machine using the latest pyo3-pack from master:
~/C/p/hyperjson ❯❯❯ pyo3-pack build
Found Python 2.7m at python2.7, Python 3.6m at python3.6, Python 3.7m at python3.7
Building the crate for Python 2.7m at python2.7
Building the wheel to /Users/mendler/Code/private/hyperjson/target/wheels/hyperjson-0.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Building the crate for Python 3.6m at python3.6
Building the wheel to /Users/mendler/Code/private/hyperjson/target/wheels/hyperjson-0.1.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Building the crate for Python 3.7m at python3.7
Building the wheel to /Users/mendler/Code/private/hyperjson
~/C/p/hyperjson ❯❯❯ l target/wheels/hyperjson-0.1.0-cp*
Permissions Size User Date Modified Name
.rw-r--r-- 677k mendler 10 Aug 0:01 target/wheels/hyperjson-0.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.rw-r--r-- 667k mendler 10 Aug 0:02 target/wheels/hyperjson-0.1.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.rw-r--r-- 667k mendler 10 Aug 0:02 target/wheels/hyperjson-0.1.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
~/C/p/hyperjson ❯❯❯ pip install target/wheels/hyperjson-0.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
~/C/p/hyperjson ❯❯❯ pip install --force-reinstall target/wheels/hyperjson-0.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Processing ./target/wheels/hyperjson-0.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: hyperjson
Found existing installation: hyperjson 0.1
Uninstalling hyperjson-0.1:
Successfully uninstalled hyperjson-0.1
Successfully installed hyperjson-0.1.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
~/C/p/hyperjson ❯❯❯ python
Python 2.7.15 (default, Jun 17 2018, 12:46:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hyperjson
>>> hyperjson.loads("1")
1
Thanks for that! I guess we can use it to publish hyperjson on pypi.
The next step would be building the wheels for Linux, probably with manylinux. I haven't worked with that before, so if you have any documentation on how to integrate that with pyo3-pack, that would be helpful.
from maturin.
Nice to hear in works on mac!
You don't need to do anything manylinux-related. pyo3-pack includes an auditwheel reimplementation and checks your libraries for compliance automatically.
from maturin.
Related Issues (20)
- Add a way to include non-python/rust files in generated sdist/wheel despite .gitignore HOT 3
- Use virtualenv for pytest in generated GitHub Actions configuration
- Use macOS M1 runner in generated GitHub Actions configuration
- Improve error when cross compiling to windows without llvm-dlltool HOT 1
- Maturin Fails to x-compile for target `--target i686-pc-windows-msvc` HOT 2
- cross compile to x86_64-pc-windows-gnu from linux builds but not working HOT 1
- option to use uv HOT 4
- error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported HOT 14
- pytest-step in provided GitHub action prefers remote package over local HOT 1
- `maturin generate-ci github` still generates `upload-artifact@v3`, which is deprecated HOT 2
- build meta wheel does not respect `metadata_directory` per PEP-517 HOT 2
- idea: "import hook" automatically installed with editable builds HOT 1
- Make `--find-interpreter` require opt-in to prereleases HOT 2
- Cannot run maturin
- InvalidDistribution due ot `maturin 1.5`? HOT 2
- Fails to build on LoongArch due to rustix-0.38.30 bump HOT 2
- build-backend - build-wheel - interpreter path - when cross-compiling, got path to interpreter HOT 1
- Generated wheel try to load wrong lib name (using uniffi generated bindings) HOT 1
- maturin 1.5 as backend breaks poetry add HOT 2
- Switch to `Metadata-Version: 2.3` breaks wheel upload to Azure Artifacts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maturin.