Giter Site home page Giter Site logo

Windows and Mac testing about maturin HOT 5 CLOSED

pyo3 avatar pyo3 commented on May 24, 2024
Windows and Mac testing

from maturin.

Comments (5)

konstin avatar konstin commented on May 24, 2024 1

@ManifoldFR you might want to try this for point-process-rust

from maturin.

mre avatar mre commented on May 24, 2024

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.

konstin avatar konstin commented on May 24, 2024

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.

mre avatar mre commented on May 24, 2024

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.

konstin avatar konstin commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.