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

add pipenv support #341

Open
oshanz opened this issue Mar 5, 2019 · 7 comments
Open

add pipenv support #341

oshanz opened this issue Mar 5, 2019 · 7 comments

Comments

@oshanz
Copy link

oshanz commented Mar 5, 2019

djangocms-installer can be installed using pipenv. also, the project can create successfully. however, if you look into the Pipfile there is nothing new, but requirements.txt file includes all the necessary dependencies. from #328

@yakky
Copy link
Member

yakky commented Mar 5, 2019

probably we can add a option which will trigger pipenv functions to convert requirements.txt file to Pipfile but I can't find any better approach than pipenv lock && pipenv --rm which is a bit silly
I'm open to suggestions

@oshanz
Copy link
Author

oshanz commented Mar 15, 2019

how about if pipenv exists, then just skip putting requirements.txt file and install requirements through pipenv. which will eventually define those in Pipfile

pipenv install --dev 'packageA<=2.*', 'packageB==1.2'

@yakky
Copy link
Member

yakky commented Mar 16, 2019

the requirements management is the most complex part of the installer and I'm worried that having a completely different way to manage would make it very brittle, but I will give your suggestion a try

@yakky
Copy link
Member

yakky commented Mar 17, 2019

@oshanz the proposed way seems workable
Could you give it a test to the linked PR?

@oshanz
Copy link
Author

oshanz commented Mar 17, 2019

great!! everything is working fine. however, I notice that pipenv dependency installation is somewhat slow. maybe that's how it is.

$ pipenv --python 3.6
$ pipenv install -e git+https://github.com/nephila/djangocms-installer.git@feature/pipenv#egg=djangocms-installer
$ time pipenv run djangocms app1
## this creates a funtional project using requirements.txt
real	1m4.662s
user	0m26.224s
sys	0m0.773s
$ time pipenv run djangocms app2 --pipenv $(which pipenv)
## Pipfile is there, everyting is functional
real	3m31.270s
user	2m13.679s
sys	0m9.966s

@yakky Good job! hope to see this in the next release. 🥂

@yakky
Copy link
Member

yakky commented Mar 17, 2019

I haven't really used pipenv in more complex setups, by I think the higher time to install is expected, as pipenv needs to build the dependencies graph and resolve eventual conflicts, and we provide a lot of dependencies for it to build its list
Providing the generated requirements file to both pip and pipenv should result in a similar time skew
As far as installation process is involved, installer just invokes the installation executable with the list of package to install

@oshanz
Copy link
Author

oshanz commented Mar 17, 2019

yes, that's true. let's close this ticket. Thanks :)

@yakky yakky removed this from the 1.2 milestone Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants