Commit Graph

10 Commits

Author SHA1 Message Date
Stéphane Graber
c223a53622 Fix environment before importing setuptools
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-10-25 19:08:34 -04:00
Stéphane Graber
26419a7a73 Use libtool for liblxc.so
This should allow proper filtering of build flags for libraries and make
it easier to use PIE/PIC.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-10-21 18:32:18 -04:00
Aleksandr Mezin
f6ab2204b7 python-lxc: use setuptools instead of distutils
setuptools is recommended by Python Packaging Guide
https://python-packaging-user-guide.readthedocs.io/en/latest/current/

It contains some useful extensions like 'develop' command. Also it
is required for building wheels AFAIK.

The only downside is an extra build-time dependency. setuptools are
packaged in both Debian and Ubuntu (python3-setuptools), as well as
other major distros, so it shouldn't be an issue, I think.

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-05-31 04:18:04 +06:00
Aleksandr Mezin
34c4f72b01 python-lxc: change distribution name _lxc -> lxc
Distribution name starting with underscore is considered invalid by
many tools. For example, you can't list such name in
install_requires in your setup.py.

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-05-29 01:08:55 +06:00
Aleksandr Mezin
f2fec47531 python-lxc: search for lxc library and headers using pkg-config
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-05-27 22:23:02 +06:00
Aleksandr Mezin
00d98acd9f python-lxc: pass include/library dirs as arguments to setup.py
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-05-27 18:05:17 +06:00
Daniel Miranda
d79067a726 build: Fix support for split build and source dirs
Building LXC in a separate target directory, by running configure from
outside the source tree, failed with multiple errors, mostly in the
Python and Lua extensions, due to assuming the source dir and build dir
are the same in a few places. To fix that:

- Pre-process setup.py with the appropriate directories at configure
  time
- Introduce the build dir as an include path in the Lua Makefile
- Link the default container configuration file from the alternatives
  in the configure stage, instead of setting a variable and using it
  in the Makefile

Signed-off-by: Daniel Miranda <danielkza2@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-22 14:05:27 -05:00
Stéphane Graber
250b1eec71
licensing: Add missing headers and FSF address
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-03 14:33:03 -04:00
Stéphane Graber
bde1853954 python: PEP8 compatibility
The new version of the pep8 command is detecting more indentation
mistakes than it used to, this fixes them.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2012-11-26 12:32:37 -05:00
Stéphane Graber
be2e4e54da Add python-lxc based on the new liblxc API.
This adds a basic python binding done in C and a python overlay to
extend some features and provide a user-friendlier API.

This python API only supports python 3.x and was tested with >= 3.2.

It's disabled by default in configure and can be turned on by using
--enable-python.

A basic example of the API can be found in src/python-lxc/test.py.
More documentation and examples will be added soon.
2012-11-12 13:16:16 -05:00