codypiersall / pynng

Python bindings for Nanomsg Next Generation.
https://pynng.readthedocs.io
MIT License
260 stars 58 forks source link

Improve on the build process of this module #92

Closed leonardp closed 1 year ago

leonardp commented 2 years ago

Adds a builder class for building mbedtls and nng. Uses setup.cfg to specify the repo url and revision.

This should fix https://github.com/codypiersall/pynng/issues/1 and can be a step to solve https://github.com/codypiersall/pynng/issues/10 as well.

leonardp commented 2 years ago

@codypiersall I saw the smoketest failing and updated the PR again.

Instead of subclassing build I now subclassed build_ext and tested it on a local Ubuntu VM with pip install -e ..

If you have the time I can recommend this blogpost on the current state of python packaging. It left me quite a bit confused on what the right way doing things would be..

leonardp commented 2 years ago

@codypiersall try again? I think I was on the wrong branch my Ubuntu VM. I have now tested it with a new clone on the correct branch with python setup.py develop and it should be fine :crossed_fingers:

codypiersall commented 2 years ago

Hey @leonardp, I really appreciate the time you've taken on this and I do like the approach.

Unfortunately some stuff in my personal life recently blew up (thankfully not involving health or family) so I do not know when I will have time to look at this in depth.

leonardp commented 2 years ago

Hello @codypiersall, I hope you are (doing) well. I've looked at the state of python packaging and https://python-poetry.org/ looks like a future-proof candidate for packaging that could be used today. Would you be OK with moving to poetry? If so, I could give this a shot.

wbadart commented 2 years ago

@leonardp, I was a poetry user for a while (personally and professionally) and really like the project, but it has some shortcomings that ultimately pushed me back to setuptools. Namely, lack of support for editable installs and lack of support for PEP 621. It's possible that neither of these are deal-breakers for pynng, but I'd personally recommend a build system with a better track record of standards adherence (e.g. flit, pdm, or of course (as of very recently) setuptools.

codypiersall commented 1 year ago

Took me over a year from the initial PR, but I finally merged this. Your PR is way better than what I was doing before, so thank you!