summaryrefslogtreecommitdiffstats
path: root/python/setup.py.in
Commit message (Collapse)AuthorAgeFilesLines
* python: reformat all Python files with python-blackThomas Haller2023-07-251-38/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automated code formatting is great. Use python-black for that ([1]). Black us not configurable much (uncompromising) and follows PEP8. It thus generates quite a standard, pleasing format. But the point isn't whether the formatting is always the most subjectively pleasing. The point is that the style is generated and enforceable by an automated tool. It takes away places for nit picking, while resulting in a more consistent code base. As this reformats the entire code base, it introduces a large diff and interferes with tools like git-blame. That will be somewhat alleviated by adding a "blame.ignoreRevsFile" for git in the next commit. The change is done automatically, by running python-black version black-22.8.0-2.fc38.noarch: $ black . The result is the same as $ ( git grep -l '#!.*\(PYTHON\|python\)' ; git ls-files '*.py' '*.py.in' ) \ | sort -u \ | xargs -d '\n' black Note that the exact result depends on the version of black. Currently that version is black==22.12.0 from pip. Yes, this means when we bump the version in the future, some reformatting will happen. [1] https://github.com/psf/black
* python: fix package meta data in setup.pyThomas Haller2015-01-121-0/+4
| | | | | | | http://lists.infradead.org/pipermail/libnl/2015-January/001802.html Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* Use paths relative to srcdir in setup.py.Michał Górny2014-05-251-4/+5
| | | | | | | | | | | | | | | | | Currently, setup.py is created by configure in builddir while source files (.py and .i) reside in srcdir. Adjust paths in setup.py appropriately to make it possible to perform an out-of-source build. This is far from perfect but it mostly works. Python files are copied from srcdir, and swig *.i files are read from there. However, swig output files are created in srcdir rather than builddir, and distutils copies '..' literally when constructing '.o' paths. As a result, '../python/foo.i' would end up being compiled to 'build/temp*/../python/foo.i'. The alternative would be to copy '*.i' files to builddir before proceeding with the build, either in Makefile or through creating additional distutils command.
* python: fix build error for missing library_path in setup.pyThomas Haller2014-01-211-0/+4
| | | | | | | | | Patch obtained from gentoo package. https://bugs.gentoo.org/show_bug.cgi?id=477110 https://bugs.gentoo.org/show_bug.cgi?id=490584 Signed-off-by: Thomas Haller <thaller@redhat.com>
* add python module for generic netlink libraryArend van Spriel2013-07-181-3/+10
| | | | | | | | | This commit adds creation of the netlink.genl package. The actual capi.i will be filled in upcoming commits so the module is rather dumb for now. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* python: Link against nl-3 and nl-route-3Thomas Graf2011-10-261-2/+2
|
* python: Include python/ in distribution and provide a README on how to build ↵Thomas Graf2011-08-121-0/+30
& install