Closed jean-christophe-manciot closed 1 year ago
I think now you should use pip: python3 -m pip install <path>
Alternatively, you could install from VCS, something like python3 -m pip install -e git+https://github.com/GNS3/gns3-server
I'm doing GNS3 installations via pip since the early 2.2 days and it's working great.
Main reason is, that the pip installation uses a location for the share folder, that I like better than the location used by setup.py, see https://github.com/GNS3/gns3-gui/issues/2919#issuecomment-572760953
@grossmj
Thanks, except that the following command installs into
python3 -m pip install . --root="../gns3-gui-build" --prefix=/usr
I tried to add the following option but it seems to be unsupported:
--install-option='--install-purelib="../gns3-gui-build/usr/lib/python3/dist-packages"'
Any suggestion?
@b-ehlers Thanks, but my goal is to build deb packages for systemd distributions, not just install gns3.
/lib/systemd/system/gns3.service
necessary on systemd distributions is not provided by pypi.@jean-christophe-manciot maybe something like python3 -m pip install . --install-option='--prefix=<install-dir>'
? (untested)
@grossmj Unfortunately, despite what is stated in 'Installing Python Modules (Legacy version) Doc' and 'pip install doc', all --install-option seem unsupported.
With build-requirements.txt:
. --install-option="--install-purelib=/usr/lib/python3/dist-packages"
python3 -m pip install . --root="../gns3-gui-build" --prefix=/usr -r build-requirements.txt
/usr/local/lib/python3.9/dist-packages/pip/_internal/req/req_file.py:191: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options, line.opts)
ERROR: Location-changing options found in --install-option: ['--install-purelib'] from file:///git-gns3-gui (from -r build-requirements.txt (line 1)). This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.
@jean-christophe-manciot let us know if you find an alternative.
@grossmj I haven't yet; I have also posted this on stackoverflow, but there is no progress yet.
@jean-christophe-manciot were you able to solve it?
No, still the same with:
I think now you should use pip:
python3 -m pip install <path>
Alternatively, you could install from VCS, something like
python3 -m pip install -e git+https://github.com/GNS3/gns3-server
This seems like a clean way to do it. Worked for me. Thanks!
Thanks, but my goal is to build deb packages for systemd distributions, not just install gns3.
We have plans to allow the installation of our gns3-server Debian package as a service. Please see https://github.com/GNS3/gns3-server/issues/1918
Is there another way to build gns3 from source?
The new recommended way is by using build, for example: python3 -m build --sdist
We have migrated to pyproject.toml. Setup.py shouldn't be used directly anymore.
python3.9 3.9.9-1 distutils 3.9.9-3 setuptools: 60.0.3
Building gns3-gui/server from source throws a Setuptools deprecation warning:
Is there another way to build gns3 from source?