Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using netman without installing lxml #191

Open
mat128 opened this issue Nov 11, 2017 · 4 comments
Open

Allow using netman without installing lxml #191

mat128 opened this issue Nov 11, 2017 · 4 comments

Comments

@mat128
Copy link
Contributor

mat128 commented Nov 11, 2017

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.

@lindycoder
Copy link
Contributor

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

@fbouliane
Copy link
Contributor

fbouliane commented Dec 13, 2017

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

@mat128
Copy link
Contributor Author

mat128 commented Jan 16, 2018

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).

@fbouliane
Copy link
Contributor

fbouliane commented Mar 29, 2018

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 :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants