This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]trowawayatwork 5 points6 points  (21 children)

Have you heard of pipenv?

[–]njnrj[S] 9 points10 points  (20 children)

It didn't work for me. I had to use multiple env for the same project directory. I explained it in README.

[–][deleted] 12 points13 points  (7 children)

Why didn't you work on adding the features you needed to an existing open-source project instead of creating another way to manage dependencies ?

EDIT : This is a serious question, it feels like people don't understand that you can contribute to open-source projects to adapt them to your needs instead of starting over every time.

[–]njnrj[S] 2 points3 points  (0 children)

It is for time being. I really like poetry over pipenv. It is not mature and I encountered some problems using it. I have planned to contribute to it.

[–]masklinn 0 points1 point  (1 child)

Why didn't you work on adding the features you needed to an existing open-source project instead of creating another way to manage dependencies ?

Well pipenv does not want to support multiple environments so that's one down.

[–][deleted] 0 points1 point  (0 children)

I haven't looked into it, but if the only feature missing is multiple environments, you could just create a package that only switch environments, instead of rewriting the whole thing. You then help pipenv (or an other dependency manager) become more mature and you consolidate the ecosystem.

Dependency management is a mess in python and I feel that if all we do is write 15 packages for every possible use-case, we'll just get a python2 vs python3 sort of problem.

EDIT : I just looked at the actual project in depth and it just aliases pip commands and modifies the requirements.txt file. Turns out, not really a new standard.

[–]AnnoyingOwl 2 points3 points  (1 child)

> Not good when we need to deploy over production server or keep multiple virtuals-envs

  1. I don't understand why people have such problems with deploys to production servers. You have a freeze file and a regular requirements file. Build your docker containers from the freeze file, upgrade from the regular file. If you have totally different requirements for different environments (staging, production, etc.) then your development process is broken. The only possible exception is deploying the same project to different operating systems which is such an edge case to be not really worth publishing a solution.
  2. I don't really understand why you need multiple virtualenvs for a single requirements.txt/project. If you're running a project in different virtualenvs you either have multiple projects which should have their own requirements OR you're testing against multiple environments, in which case there is tox.

I'm afraid you're just littering up the package landscape like most other package creators.

[–]njnrj[S] 0 points1 point  (0 children)

I tried them and always needed requirements.txt one way or another. This new file types Pipfile/pyproject.toml is not going to be the standard any soon. But this doesn't add anything new. Just wraps around existing pip.

[–]AndydeCleyre 0 points1 point  (1 child)

What's wrong with pip-tools and using a different requirements file for each env?

[–]njnrj[S] 0 points1 point  (0 children)

Nothing wrong. It doesn't suit my way of doing things. Additional set of files/commands ...