Skip to content
Snippets Groups Projects

Resolve "PyPi packaging issues"

Merged Nils Brüggemann requested to merge 14-pypi-packaging-issues into master

Closes #14 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Nils Brüggemann added 3 commits

    added 3 commits

    • ac22d4a0 - setup.py and MANIFEST.in: Make sure that PyPi is not missing the requirements.txt.
    • aa53ba53 - Only import ipdb if it is present.
    • b753de8c - requirements.txt: Move installation of ipdb and pytest to separate file...

    Compare with previous version

  • @m301014, I would be curious about your opinion here. I am perfectly fine with the first two commits but I am kind of unsure about the third one. What do you think?

  • My ever-so slight concern would be that without pytest in the requirements.txt file, (automated) testing will only ever be possible using a python environment which is different to the "required" environment used by most users. I suspect it's unlikely pytest or its dependencies will ever be the cause of user issues, but it could be a draw back.

    In the long run, I think having a separate set of development requirements is probably a good idea, especially if they grow in the future (it could even include useful as well as necessary packages). A benefit I see is that if a user has an existing python environment administered by someone else, they can use pyicon without having to ask the administrator to install ipdb which they won't ever use.

  • Ok, I found some solution that might make work nicely. In the setup.py, I specify:

    with open("requirements_documentation.txt") as f:
        documentation_requires = f.read().strip().split("\n")
    
    with open("requirements_development.txt") as f:
        development_requires = f.read().strip().split("\n")
    ...
        extras_require={
            "dev": development_requires,
            "doc": documentation_requires,
            "full": development_requires+documentation_requires,
        },

    Now, one can install like this:

    pip install -e .       # only base functionality, no testing and no documentation
    pip install -e .[dev]  # with modules for testing and debuing 
    pip install -e .[doc]  # with module for compiling the documentation
    pip install -e .[full] # a full installation

    I hope that this a good compromise.

  • added 1 commit

    • 791fbd97 - setup.py: Allow for more installation option.

    Compare with previous version

  • Nils Brüggemann added 4 commits

    added 4 commits

    Compare with previous version

  • Nils Brüggemann marked this merge request as ready

    marked this merge request as ready

  • mentioned in commit d477a143

Please register or sign in to reply
Loading