Closed ehmatthes closed 3 years ago
USING_REQUIREMENTS_TXT
.USING_PIPFILE
.USING_REQUIREMENTS_TXT
.In modifying Pipfile, I can't just append new package names onto the end of the file. They need to go in the [packages]
section. Awk should be able to do this:
$ cat Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
$ DATA='[packages]\ndjango = "*"'
$ awk -v r="$DATA" '{gsub(/\[packages\]/,r)}1' Pipfile | xargs -0 echo > PipfileModified && mv PipfileModified Pipfile
$ cat Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "*"
requests = "*"
[dev-packages]
I'm sure there's a cleaner way to do this without the temporary PipfileModified, but this should get things working.
A simple project using Pipenv to manage dependencies deploys successfully.
Handling projects that use a Pipfile instead of requirements.txt shouldn't be too difficult. It should be a matter of: