PaperPi
PaperPi copied to clipboard
create_devel_environment fails when package is listed twice in Pipfile
@aaronr8684 This is a really, super edge case, but is annoying and good to be aware of:
The create_devel_environment.sh script fails when the same package is listed in the Pipfile [packages]
section as an editable package and then again in the [dev-packages]
section as a regular package.
This occurs specifically when the development packages are installed from the various requirements-*.txt
files using pipenv install --dev -r $path_to_reqs_file --no-lock
. If a package appears under the [packages]
heading and in the requirements.txt file, pipenv will crash spectacularly:
raise InvalidRequirement( pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at ""[True, '"": Expected stringEnd
This is causing problems because several of the core plugins (librespot and lms_client) specifically require a class from epdlib
and on the development branch of PaperPi we are tracking the development branch of epdlib. This ultimately results in having epdlib show up twice in the development section as well as the packages section.
This shouldn't be a problem once we move off of the epdlib development branch and can publish to pypi.
Workaround:
- Start with no pipenv (
pipenv --rm
) - create the new development environment (
./utilities/create_devel_environment.sh
) -- this will crash out - edit the Pipfile and remove
epdlib
from the[dev-packages]
section - run
pipenv install --skip-lock
to finish installing dev-packages