certtools / intelmq-manager

IntelMQ Manager is a graphical interface to manage configurations for IntelMQ framework.
https://docs.intelmq.org/latest/user/manager/
102 stars 56 forks source link

The PyPi wheels contain outdated code #265

Closed monoidic closed 3 years ago

monoidic commented 3 years ago

For some reason, when installing intelmq-manager 3.0.0 via pip, both old and new versions of the code under intelmq_manager/static within this repo are present, with the new/correct version being under ${PREFIX}/usr/share/intelmq-manager/html (as mentioned in the documentation), though there is also ${PREFIX}/intelmq_manager/html for some reason, containing an older version of the same code, from this commit, before the 3.0.0 API change additions. This likely bloats the size of the wheel, due to code duplication, particularly due to vis.js being included twice, and may cause confusion if the upgrade documentation is not thoroughly followed.

ghost commented 3 years ago

packaging (the intelmq-manager/api) for pip/pypi is a nightmare. Sticking to rpm/deb would be so much easier... One "workaround" could be to use a similar approach like intelmqsetup for intelmq: A command needs to be called after the installation, which generates the html files and places them at the correct destination.

ghost commented 3 years ago

Well. I had an old directory intelmq_manager/html/ in my local repo (that path is also in the .gitignore). Hard to reproduce elsewhere.

ghost commented 3 years ago

Maybe the problem was equal to the one which resulted in https://github.com/certtools/intelmq/issues/2116. Apparently python3 setup.py sdist bdist_wheel use the code in the build/ directory and cleaning that one seems to be mandatory.