drufat / triangle

Python bindings to the triangle library
GNU Lesser General Public License v3.0
236 stars 54 forks source link

Build wheel for Python 3.10 and Apple M1 #64

Open connorferster opened 2 years ago

connorferster commented 2 years ago

Hi @drufat!

Thank you for this excellent Triangle wrapper. We use it in sectionproperties and, by extension, concreteproperties.

Your package is quite popular and I think that, as Python 3.10 is becoming more widely adopted, it would be wonderful if you were willing to publish an update in PyPI with wheels built for all platforms with all of the latest versions of Python.

I believe that this can be done automatically through GitHub actions using this tool: https://github.com/pypa/cibuildwheel.

Thank you for taking the time to consider this request and thank you for your contributions which allow us to build great tools from your Triangle wrapper.

oaazeved commented 1 year ago

Just came to ask the same! I really appreciate how well this wrapper works, and it suits many purposes; an osx_arm64 version would be very useful to me and I'm sure to many others.

smith120bh commented 1 year ago

@connorferster : It looks like there is actually a GitHub action in here that uses cibuildwheel already: wheels.yml - and it ran successfully after the last pull request in January 2023.

The problem seems to actually be in publishing to PyPI. That same action also has code for publishing - but there's something weird going wrong with it. PyPI.org says that the most recent version of triangle is 20220202, but both I and one of my colleagues are seeing that pip is only finding versions up to 20200424:

$ pip index versions triangle
triangle (20200424)
Available versions: 20200424, 20200404, 20200325, 20190115.3, 20190115.2, 20190115.1, 20190115, 20170429, 20170106, 20160203, 20160202, 2015.12.14, 2015.12.13, 2015.3.28, 2013.4.5, 2013.1.7, 2013.1.6, 2012.7.4, 0.3, 0.2, 0.1, 2013.01.06.linux-x86_64

Forcing pip to use the Git repo directly seems to work fine for installing...

$ pip install git+https://github.com/drufat/triangle.git
connorferster commented 1 year ago

Exactly, I need it current on PyPI :(

smith120bh commented 1 year ago

Given that there seems to be quite a few people with the same (long-standing) issue, and this package is LGPL, it may be worth forking it and creating a new PyPI repo...

drufat commented 1 year ago

The library already uses cibuildwheel to automate builds, but not sure how to add support for Apple M1. If you could provide a pull request that works, I'd be happy to merge it.