![]() Rewrite all imports of flask in bizbaz to flask_0_12_4_1pamldmw2y7g.Rename the dist in site-packages and move the package to flask_0_12_4_1pamldmw2y7g.Use Rope to rewrite all the imports of flask of itself to flask_0_12_4_1pamldmw2y7g and rename the package to flask_0_12_4_1pamldmw2y7g.Create a build of flask for 0.12.4 and install.Normally these two packages would be incompatible. Lets say that package bizbaz wants an old version of flask=0.12.4 but we have another package foobar that requires the latest version of flask>=1.0. I wrote a tool python-rewrite-imports that helps to make multiple versions possible. We cannot let a single package restrict the version of other packages. ![]() io reports that 400+ packages depend on pendulum. Pendulum release is over 1.5 years old and libraries. In the same PYTHONPATH cannot depend on the latest version. Some packages fix the version of a package such that other packages Requires jsonschema >= 3.0.1 and cfn-python-lint did not Requires import flask it searches the path for flask and uses theįor nixpkgs this is troublesome because it prevents all packages fromīeing compatible with one another. In python this philosophy breaks down because all packagesĪre specified in the global PYTHONPATH. Library/binary we have luxury of rewriting the shared library pathĪllowing two packages that use different versions of a package toĬoexist. May be incompatible with one another but if it is a compiled Single version of each package (preferably latest) with all packagesĬompatible with one another. Type "help", "copyright", "credits" or "license" for more information. Idea is not nix specific but would rely on package managers/builds to It requires nix (sorry no windows support in nix). In this demo bizbaz requires flask=0.12.4 and foobar requires flask>=1.0. This is a self contained demo of having multiple versions of a python But for a package manager to provide a consistent place where all packages are “nearly” compatible a trick like this is needed for nixpkgs and possibly others. I want to clarify I definitely don’t think this is a feature that should be regularly used nor depended on. Sorry discourse prevented sharing all links… to only 2 so go to the repo for actual html links. All of the materials/demo is in this repo. The only nix specific part is the tooling to allow for the building of these specialized packages. This is a general approach that is not specific to nixpkgs and could be used in other package managers. TLDR I wanted to get feedback on a potential feature that may be added to nixpkgs that allows multiple versions of the same python package to be installed in the same PYTHONPATH.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |