Replies: 2 comments 4 replies
-
Hmm, I wonder if it could be done with more transparent backwards compatibility?... Such as, |
Beta Was this translation helpful? Give feedback.
-
I'm using just a subset of pyroute2 packages so pyroute2-minimal is insufficient and pyroute2 is just to much. The namespace approach looks non-portabel. Would it possible to provide a generic entry point loader in the core package (or a pyroute2-entrypoint package)? |
Beta Was this translation helpful? Give feedback.
-
Pyroute2 packages
There are two types of pyroute2 packages:
pyroute2
namespace and load there all the entry points from namespace packagespr2modules
namespace and provide entry pointsVirtual packages
The project has two virtual packages:
pyroute2
-- requires all the pyroute2 modulespyroute2.minimal
-- requires only the coreThese packages provide the same
pyroute2
namespace.Installation example:
pip install pyroute2
orpip isntall pyroute2.minimal
Since
setuptools
provide no conflict declarations, it is possible to installpyroute2
andpyroute2.minimal
simultaneously, but it's a bit meaningless, sincepyroute2.minimal
provides subset ofpyroute2
deps.Usage
Virtual packages installed
In this case the usage has no difference from what was before:
No virtual packages installed
Usage of standalone namespace packages is also possible, though a bit more complicated. Let's assume we have only
pyroute2.core
installed in the system.To run the same
IPRoute
as above, one should use eitherpr2modules
namespace or entry points. Using the namespace:Using entry points:
Related
Beta Was this translation helpful? Give feedback.
All reactions