Project

General

Profile

Actions

Bug #211

closed

Install python pip on fluffy

Added by Guilhem Saurel almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-

Description

Hello,

I am testing the integration of packages from pypi, like
http://robotpkg.openrobots.org/rbulk/robotpkg-wip/wip/py-quadprog/

For this, I would need pip to be installed on fluffy, could you do that ?

Cheers,
Guilhem.


Files

patch (316 Bytes) patch Anthony Mallet, 2019-07-05 11:35
Actions #1

Updated by Anthony Mallet almost 5 years ago

pip is a priori orthogonal to robotpkg. That and the fact that it
downloads stuff behind the scene makes it kind of incompatible with
robotpkg.

AFAICT py-quadprog does not require pip, it uses a standard setup.py.
Is there something wrong with PYDISTUTILSPKG=yes ? (see sysdep/python.mk)
(or maybe sysdep/py-setuptools.mk, I can't remember which one is the
standard one from a python standpoint).

Actions #2

Updated by Guilhem Saurel almost 5 years ago

I agree that pip is also a package manager, and therefore using with robotpkg doesn't seem to be a good idea at first sight.

But PYDISTUTILSPKG=yes uses "easy install", which is deprecated¹, and just doesn't work in the case of py-quadprog, because ${PYTHON_SITELIB}/quadprog${PYTHON_EXT_SUFFIX} is not created, and therefore we can't run "import quadprog". Also, it creates a ${PYTHON_SITELIB}/site.py and a ${PYTHON_SITELIB}/easy_install.pth, I guess to try to workaround that, but this wasn't working on my system.

So I tried to use pip only as the "installer" of a package already downloaded, following conventions I found on sysdep/python.mk for PYDISTUTILSPKG=yes, but at the moment I am not sure that it will not try to download and install dependencies. But if it does, we could add options to prevent it:

Package Index Options:
-i, --index-url <url> Base URL of Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.
--extra-index-url <url> Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.
--no-index Ignore package index (only looking at --find-links URLs instead).
-f, --find-links <url> If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.

¹: https://setuptools.readthedocs.io/en/latest/easy_install.html

Actions #3

Updated by Guilhem Saurel almost 5 years ago

Also, I didn't find a way to have a standard "make" target, and after that a "make install" one…

Actions #4

Updated by Anthony Mallet almost 5 years ago

On Friday 5 Jul 2019, at 11:16, Guilhem Saurel wrote:

But PYDISTUTILSPKG=yes uses "easy install", which is deprecated¹

No, that's the py-setuptools that uses this and that is
deprecated. PYDISTUTILSPKG does nothing by itself buf using the
setup.py. In turn, setup.py uses the standard distutils package.

I checked further and that's the quadprog setup.py that uses
deprecated stuff. With this patch it's fine :

Actions #5

Updated by Anthony Mallet almost 5 years ago

On Friday 5 Jul 2019, at 11:35, Anthony Mallet wrote:

I checked further and that's the quadprog setup.py that uses
deprecated stuff. With this patch it's fine :

Sorry, I forgot this that is required as well, in the Makefile:

MAKE_ENV+= PYTHONPATH=${PREFIX}/${PYTHON_SITELIB}

This is required by a number of packages, I could think about
automating this.

Actions #6

Updated by Guilhem Saurel almost 5 years ago

  • Status changed from New to Closed

I see, with distutils it works, thanks for the help !

Actions

Also available in: Atom PDF