nephila / djangocms-installer

Console wizard to bootstrap django CMS projects

Home Page:https://djangocms-installer.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add pipenv support

oshanz opened this issue · comments

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

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

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'

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

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

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. 🥂

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

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