netman icon indicating copy to clipboard operation
netman copied to clipboard

Allow using netman without installing lxml

Open mat128 opened this issue 8 years ago • 4 comments

Currently, netman depends on ncclient and pulls lxml when installing. This is problematic because lxml often has to be compiled. Additionally, the version of lxml used (3.6.1) clashes with Ubuntu Xenial's packaged version (3.5.0). This library is useless when using netman to access switches other than Juniper models.

A workaround is to specify lxml at the same time as installing netman (or a package requiring netman), as such: pip install lxml==3.5.0 netman When doing so, pip honors the specific request for lxml and skips the version requirement for netman.

Using the extra dependencies (https://www.python.org/dev/peps/pep-0508/#extras) or different packages for switch model support (that could all use a "core" netman) would be extremely beneficial for external usage.

mat128 avatar Nov 11 '17 16:11 mat128

I like the idea of a core and separate packages for models

lindycoder avatar Nov 27 '17 16:11 lindycoder

I like the core package and switches package as well. The only problem I see with it is the difficult workflow that comes with it. How do I version those packages ? How do I push to travis and pypi multiple package if I have a single repo? I can use multiple repo but then it's complicated on the developer side ....

The other thing is that moving to another package format has some backward compatibility issue. Something like the following would ensure a easy installation for everyone ... we'll see netman -> [netman-core, netman-juniper, netman-dell, etc...]

As a workaround to make the project more easily accessible, I suggest that we make sure dependencies are not pinned in the setup.py/requirements.txt . This will allow people to reuse their current environment and be compatible with more projects.

PR #192 should be a step in the right direction, and allow you to remove your pip install hack

fbouliane avatar Dec 13 '17 05:12 fbouliane

I agree with your points, Felix. Having a meta netman package that depend on the splitted packages would allow for a smooth transition.

For the record, you can have multiple python modules in the same tree and I think you can publish them separately (subfolders with their own setup.py/setup.cfg is one way it would work).

mat128 avatar Jan 16 '18 05:01 mat128

Just had a vm that didn't install lxml because it takes more than 512MB of ram to compile lxml. That library seems to be a recurrent problem :/

fbouliane avatar Mar 29 '18 13:03 fbouliane