Giter Site home page Giter Site logo

pip-deepfreeze's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pip-deepfreeze's Issues

Support overrides

uv supports overrides, and pip may support them at some point.

Design

  • detect overrides.txt
  • when installing, remove entries that are in requirements*.txt from overrides.txt
  • pass the resulting overrides to the install command with -o (uv only for now)

Pin pip, setuptools, wheel and distribute when they are dependencies

When pip, setuptools, wheel and distribute , they are never present in locked requirements.
This is because pips omits them by default in pip freeze output.

We change to call pip freeze --all but never propose to uninstall these as they may be necessary to build legacy projects without build isolation.

Error when adding extras to an already installed project

To reproduce, create a project with a setup.py and pip-df sync it.
Then add and extras_require with an extra named, say, dev.
Then run pip-df sync -e dev. It complains that dev is not an extra of the project.

To make it work, you need to pip uninstall the project then pip-df sync again.

Virtualenv detection may be too strict

From the FAQ: pip-deepfreeze erroneously complains python is not running in a virtualenv.

The most probable cause is that you used an older version of virtualenv which does not generate PEP 405 compliant virtual environments. virtualenv version 20 and later are supported, as well as the Python 3 native venv module. Should this problem be prevalent in practice, we may add support for older virtualenv versions, or add an option to ignore the virtualenv sanity check (which is only there to prevent pip-deepfreeze to corrupt the system Python packages by accident).

Switch toml parser

Looks like the packaging community is moving to tomli, which is smaller and fully toml 1.0 compliant.

Update not working for dependecy installed from GIT hidden ref if ref comes from a fork

Github allows you to reference a pull request as a hidden ref you can fetch. This feature is useful to keep a log of you open PR required by your project.

In order to declare a dependency to a new patched version of one of my project's dependencies, I've added into my requirements.txt.in the following line:

odoo10-addon-account-banking-mandate @ git+https://github.com/oca/bank-payment.git@refs/pull/727/head#subdirectory=setup/account_banking_mandate

and used the update command to install and freeze this new version of my dependency
pip-df sync --update odoo10-addon-account-banking-mandate

(PR from acsone/bank-payment to oca/bank-payment)

At the end of the process, the dependency is correctly installed however the updated entry into my requirements.txt file is not right. Indeed, even if the sha is the right one, the ORG into the github url is the one on which the pr has been made not the one from which the changes are submitted....

odoo10-addon-account-banking-mandate @ git+https://github.com/oca/bank-payment.git@84d5fd2cc8c9bbca6b036ad5f8d87776d1b3fdad#subdirectory=setup/account_banking_mandate

Is-it a know limitation or a bug?

Rename requirements.txt.in to constraints.txt

requirements.txt.in is somewhat misnamed, as it actually contains pip constraints and options.

constraints.txt would more accurately reflect what the file is for, i.e. constraining dependencies when it is not practical or desired to put such constraints in pyproject.toml project.dependencies.

--update/--update-all not working in some edge cases

When a new dependency is added to the project, and it is already installed while not being part of requirements.txt, using --update or --update-all may not update it to the latest available version.

This is a very edge case that is probably not an issue in practice.

Allow non-editable install

It would appear that pip-deepfreeze tries to install the local package in editable mode:

pip install -e .

Unfortunately, I have a case where this does not work reliably. The reason being that I have multiple local packages which pip does not resolve well. The reason being that pip believes packages to be conflicting if one package is installed in editable mode, and the other is installed in non-editable mode from a path. There are also issues where pip believes there is a conflict if the paths are not identical (e.g. /src/pkg-b/../pkg-a and /src/pkg-a are the same, but pip will see a conflict).

I could not see an option with pip-deepfreeze to allow a non-editable installation. Could this be added behind a flag?

Platform awareness

Currently, the naming scheme of generated requirement files is hard coded (requirements.txt, requirement-{extra}.txt) and is generated for the platform/interpreter on which pip-deepfreeze runs.

It might be useful to have an optional naming scheme that includes platform/interpreter information.

Support environments where pip is not installed

This could be done by providing pip-deepfreeze with a target pip command in addition to a target python interpreter.
That pip command could then be target-pip --python {target-python} ....

Default extras

Developers typically need to remember to use pip-df sync -x test,dev. This is not optimal.

Two possibilities:

  • sync install all extras by default
  • configure default extras in pyproject.toml, in a tool.pip-deepfreeze section.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.