pygmo2 icon indicating copy to clipboard operation
pygmo2 copied to clipboard

Add distribution source to pip

Open johnnymck opened this issue 5 years ago • 5 comments

#32 Adds source distribution to PIP.

Once built; will need to be uploaded to PyPi.

Some edits may be required to setup.py. Feel free to make these changes 😀

(also please ignore the branch name - minor brainfart on my part)

johnnymck avatar Jul 12 '20 12:07 johnnymck

Hi @johnnymck, I've tested your PR on MacOS Catalina 10.15 using a branch link:

pip3 install git+https://github.com/johnnymck/pygmo2.git@add-distrobution-source-to-git

Although the pygmo package formally builds, the native C++ modules ain't getting compiled in:

  File "/Users/marcusmae/hypersolve.io/spyder/venv/lib/python3.7/site-packages/pygmo/__init__.py", line 13, in <module>
    from .core import *
ModuleNotFoundError: No module named 'pygmo.core'

dmikushin avatar Aug 05 '20 18:08 dmikushin

Hiya @dmikushin, is this perhaps due to my lack of ESA's CICD on my repo performing all the build steps perhaps? I'm not certain on why this might happen, but I suspect this may be why.

johnnymck avatar Aug 05 '20 18:08 johnnymck

@johnnymck I'm not sure how CICD is getting into play here. I think it's rather about the actual content of setup.py. As long as they have C++ sources, their compilation must be explicitly handled within setup.py, as shown e.g. here.

dmikushin avatar Aug 05 '20 18:08 dmikushin

Aye it would seem that you're correct. 👍

My C++ is a tad rusty - what are the usual compilation steps, and which is the main file in the pygmo cpp library, so I know how to include the compilation steps?

johnnymck avatar Aug 06 '20 15:08 johnnymck

@johnnymck If you are on Linux/Mac, please test https://github.com/esa/pygmo2/pull/56 :

pip3 install git+https://github.com/apc-llc/pygmo2.git

Builders are yet to be fixed.

dmikushin avatar Aug 07 '20 21:08 dmikushin

Closing this. Thank for the attempt, but we cannot add the source using this method as the library compiled from c++ is architecture dependent. A wheel must be compiled for each platform and uploaded. For all linux the manylinux project provides this and is now active again via #117

darioizzo avatar Jan 16 '23 23:01 darioizzo