Skip to content
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

rez-pip NO packages were installed #503

Open
asztalosdani opened this issue Apr 6, 2018 · 7 comments
Open

rez-pip NO packages were installed #503

asztalosdani opened this issue Apr 6, 2018 · 7 comments
Labels
rez-pip ingesting py pkgs into rez (pip, wheels, etc)

Comments

@asztalosdani
Copy link
Contributor

asztalosdani commented Apr 6, 2018

Hi,

when installing Qt.py package with rez-pip, it fails.

C:\Users\daniel.asztalos>rez-pip --install Qt.py
15:57:58 INFO     Using pip-1.5.6 (C:\Users\daniel.asztalos\packages\pip\1.5.6\package.py[0])
Downloading/unpacking Qt.py
  Downloading Qt.py-1.1.0-py2.py3-none-any.whl
Installing collected packages: Qt.py
Successfully installed Qt.py
Cleaning up...

NO packages were installed.
@assumptionsoup
Copy link

I've had this happen on and off too. On my system I have anaconda installed, and I have noticed that rez-pip completes an install of Qt.py into anaconda instead of a rez package. I wonder if this is an issue with anaconda, windows, or both.

@assumptionsoup
Copy link

assumptionsoup commented Apr 11, 2018

Running the command twice, results in rez telling me that the requirement is satisfied:

>>>rez pip --install qt.py
15:12:33 INFO     Using pip-1.5.6 (F:\packages\int\pip\1.5.6\package.py[0])
Requirement already satisfied (use --upgrade to upgrade): qt.py in c:\users\jordan\appdata\local\continuum\anaconda2\lib\site-packages
Cleaning up...

NO packages were installed.

Which isn't really helpful in any scenario. The fact that I have a package on my system already shouldn't affect my ability to create a rez pacakge IMO. Just because it's on my system doesn't mean it's on everyone's system. That's rez's job.

@willjp
Copy link
Contributor

willjp commented Apr 17, 2018

I've also had this happen on windows - I tried a few of my deps without success, then went searching on the google-group and tried installing the package that was being used as an example when rez-pip was launched (flask).

https://groups.google.com/forum/#!searchin/rez-config/rez-pip%7Csort:date/rez-config/Pro1FGuRzIY/wjSXFydfDQAJ

That did mostly work, enough that I was able to use what worked as a base to create other packages. It's a bit of a chore, but it works well enough, and similar to the amount of effort I was putting in before rez.

.../packages/mock/2.0.0/
    platform-windows/arch-AMD64/os-windows-10.0.16299/
        maya-2017/
        maya-2018/
        python2.7.14/
        python3.6.4/
            python/
                <site-packages contents...>
    package.py
# package.py
# -*- coding: utf-8

name = 'mock
version = '2.0.0'
requires = [
    'six',
    'funcsigs',
    'pbr-1.3+',
    'setuptools-17.1+',
]

def commands():
    env.PYTHONPATH.append('{this.root}/python')

timestamp = 152391867
format_version = 2

@BuildMonkey
Copy link

I am currently bumping up against this problem attempting to 'rez-pip install celery'.

I have downloaded a recent version of rez and attempted on both macOSX and Linux, but afraid I am receiving the same problem. Is there a viable workaround?

Thanks!

@instinct-vfx
Copy link
Contributor

The current implementation of rez-pip does not really work on windows (unless you have a very specific setup and take extra special care). The reason is that the way it uses to retargets the install to a custom directory (--install-options=-install-lib etc) enforces use of source packages. That means everything that is not a pure python package needs a proper, working and matching compiler setup. And even then i doubt it would work out of the box simply because this is really non-trivial on windows.

I have created an internal tool (sadly also called rez-pip currently heh) that takes a different approach that also works on windows (as long as binary packages are available). It creates an empty virtualenv, installs using standard pip methods, then uses distlib to get a list of installed distributions and files (ignoring the standard installed packages like setuptools) and converts them to rez-packages.
Then it iterates over all files to find out if any binary extensions are part of the package (.dll, .pyd etc.) and depending on the outcome sets different variants to prevent re-installing pure python packages multiple times (per arch, platform and python version).

It still has some rough edges (partly also in rez, see for example) and it also has some conceptual problems on windows that i am unsure how to work around. The biggest is, that setuptools/distlib uses .exe wrappers to create executables for scripts (e.g. bumpversion.exe). These are sadly hardwired to the python executable they were created with, which creates a hard dependency between the package and the python version rez-pip was called with. This could of course be wired up to be Rez' python, but in our setup we split Rez from python and hence switching to a newly released rez with a different python version associated could break these executables, removing the python version it was deployed with definitely breaks them. Any input on that issue would be really welcome.

Cheers,
Thorsten

@BuildMonkey
Copy link

Thank you for the feedback Thorsten. We currently do not have to support Windows, but at this time, only MacOSX and Linux. Are you suggesting your solution could work in these environments as well?

@instinct-vfx
Copy link
Contributor

I have no idea, but i doubt it to be honest. This has currently been developed and tested only on windows.

@JeanChristopheMorinPerso JeanChristopheMorinPerso added the rez-pip ingesting py pkgs into rez (pip, wheels, etc) label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rez-pip ingesting py pkgs into rez (pip, wheels, etc)
Projects
None yet
Development

No branches or pull requests

6 participants