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

Create virtualenv with multiple packages (requirements) #1129

Closed
nffdiogosilva opened this issue Jun 6, 2016 · 10 comments
Closed

Create virtualenv with multiple packages (requirements) #1129

nffdiogosilva opened this issue Jun 6, 2016 · 10 comments

Comments

@nffdiogosilva
Copy link

nffdiogosilva commented Jun 6, 2016

Hello there,

I'm having problems understanding correctly how the command works to generate a package with a specific virtualenv and its requirements.

The way I'm using it... I can only create a virtualenv per requirement?! This doesn't make any sense IRL, IMO.

e.g:
fpm -f -n virtualenv_name --virtualenv-install-location /directory_to_install_virtualenv -s virtualenv -t deb package(??)

How can I create a package for a virtualenv with multiple requirements?

Thanks in advance,
Nuno

@hatt
Copy link
Contributor

hatt commented Jun 7, 2016

Are you trying to build separate packages for each dependency? I believe the way the virtualenv support works is to build your full virtualenv with all dependencies and turn it into a monolithic package.

@nffdiogosilva
Copy link
Author

nffdiogosilva commented Jun 7, 2016

No. Exactly the opposite.

I'm trying to do exactly like you're saying. That is, a virtualenv with all my dependencies inside it. But I can't. Apparently I'm using the command wrong...?

Could you (or someone else) give me an example to how create a virtualenv with all the dependencies inside it?

Thank you

@hatt
Copy link
Contributor

hatt commented Jun 8, 2016

Can you paste an actual command and log output you're trying with the --verbose --debug flags enabled?

My understanding after reviewing the code is that the only real dependency for a virtualenv package should be python itself. If you need to add other dependencies, you can use the normal --depends <meta> flag that FPM uses for everything. Since all python dependencies to a system are packaged into the virtualenv itself, the only dependencies here would be system libraries they link against. Python is not aware of it's system dependencies for modules however so FPM has no way to self determine those.

There may be a bug here (it seems likely) but I'm not quite sure exactly how you're doing what you're trying to do as the example in the original post isn't something that can be run.

@nicobrevin
Copy link
Contributor

I'm not sure if it's the same, but I've submitted #1131 to support assembling a virtualenv, not from a python package in a pip repository and it's requirements, but an arbitrary list of them in a requirements.txt file. Is that what you're trying to do?

@nffdiogosilva
Copy link
Author

If it installs all the requirements in the virtualenv when the package is installed, then yes! 👍

I still didn't have the opportunity to check your code, but it seems that it is what I want.

I'll try your code when I have the chance. Thank you!

@nzjrs
Copy link
Contributor

nzjrs commented Nov 1, 2016

It sounds like you need my branch

#1218

@jhermann
Copy link

The other working solution (for Debian) is dh-virtualenv.

@nzjrs
Copy link
Contributor

nzjrs commented Jun 27, 2017

@jhermann FYI this bug can be closed as my branch #1218 was merged

@jhermann
Copy link

Only the OP @nffdiogosilva, or a project member can close tickets. (hint)

@jordansissel
Copy link
Owner

Oops, thanks for the reminder to close :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants