-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Python environment and fix python features for packages #3105
Conversation
TODO: - Add debug support for python and numpy (like python-dbg and python-numpy-dbg packages on apt-get) - Add blas support for numpy - Add python binding support to ogre, vtk, pybind
Also update mirrors for its dependencies
Bug already fixed in pip, however, it seems that the patch is not included yet in the latest release of pip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be necessary to increment version number.
ports/vtk/CONTROL
Outdated
Description: PDF libharu functionality for VTK | ||
Build-Depends: libharu | ||
Source: vtk | ||
Version: 8.1.0-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need version increment.
@@ -76,3 +76,7 @@ Description: JPEG 2000 support for opencv | |||
Feature: eigen | |||
Build-Depends: eigen3 | |||
Description: Eigen support for opencv | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When change made, version should be incremented.
ports/pybind11/CONTROL
Outdated
Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. | ||
Build-Depends: python3 | ||
Source: pybind11 | ||
Version: 2.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need version increment such as 2.2.1-1
ports/python3/CONTROL
Outdated
Source: python3 | ||
Version: 3.6.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need version increment.
Thanks for reminding. Fixed. |
Is this branch able to be merged? I am going to add some python packages but I don't want to make this PR so large. |
Thanks for the PR and sorry for the delays! First, I'd like to re-establish the core purpose of Vcpkg: we want to solve the problem of third party libraries for C and C++ developers so they can build their own applications. We aren't trying to become an application manager for Windows -- that's Chocolatey or the Windows Store. We also aren't trying to be a package manager for python: there's already pip and https://docs.anaconda.com/. I think they've done an amazing job at this and we can't (and shouldn't!) dream of outdoing them in the realm of packaging python. Given this, could you help frame the need for building out a parallel package graph of the core python packages? To be clear, I'm not saying this isn't a great PR -- I just need some help understanding :) |
My main purpose for reorganize the structure for python is to help C/C++ libraries build and distribute their python bindings. Major reasons are listed as follows:
To make my motivations clear, there are some things that I didn't intend to do:
In addition, PyPI is good for python users but not good enough for python developers. You may take a look at how we have to search for python wheels for some packages here. |
Any concerns preventing this from being merged? |
I made pull request about python2 port: #3999 Also IMHO would be nice to split the pull request into multiple parts. |
This looks very nice. Any progress here? I understand the argument that vcpck is not an package manager for python. However as I understand the goal here is very different: all ports that distribute python bindings with their original source (eg opencv) should work out of the box with python-embedded (!) build by the vcpkg python port. So when launching an python environment from source, installed ports should be available and just work. As far as I understand using binary distributions or anaconda does not work here, because this will use different incompatible dlls from this distribution. (?) Embedded python usage example:
|
@ras0219-msft @Rastaban @vicroms @grdowns Will you accept this pull request if I fix it with current portfiles? It's hung up for a long time. |
@cmpute Please fix the merge issues. Otherwise they are not able to merge your changes. |
Hi @cmpute, thanks for this PR! Could you resolve these conflicts? |
@cmpute Going to close this PR as this PR has been open too long. If you are interested in working on this, feel free to reopen, but it might make more sense to make a new PR (otherwise we might lose track of it). |
Also I realize we haven't given much feedback on this PR for a long time. If you are still interested in some feedback, let me know and we can reopen this and prioritize this PR. |
Fix #2974.
Fix possibly #2370
Modifications
python3
withexecutable
feature will setup python environment in installed directorypython/
anddebug/python/
with fullLibs
andsite-packages
folder. You can actually use thepython.exe
in it as a kind of python distribution.pip
to installed python aspython-setuptools
Cython
andNumpy
are now avaliable.vtk
,ogre
andpybind11
are fixed to fit the folder structure. (SWIG are added to acquired modules for ogre, while ogre cannot be built successfully here on my PC because of some SWIG issues). Generated python modules will be installed to(debug/)python/Lib/site-packages
.Opencv
can be built with python bindings now (which depends on numpy).vcpkg env --python
will addpython/Lib/site-packages/
toPYTHONPATH
instead ofpython/
vcpkg remove <...>
, however, cache modules which are compiled by python will not be removed byvcpkg remove python3
.python-setuptools