distutils

Building a ctypes-“based” C library with distutils

浪子不回头ぞ 提交于 2020-06-24 05:57:04
问题 Following this recommendation, I have written a native C extension library to optimise part of a Python module via ctypes. I chose ctypes over writing a CPython-native library because it was quicker and easier (just a few functions with all tight loops inside). I've now hit a snag. If I want my work to be easily installable using distutils using python setup.py install , then distutils needs to be able to build my shared library and install it (presumably into /usr/lib/ myproject ). However,

why do I keep getting this message when installing saying EntryPoint must be in 'name=module:attrs [extras]

岁酱吖の 提交于 2020-06-11 16:54:26
问题 Hi I am on OSx Mavericks, using python 2.7 and pip version 6.0.8 and setuptools version 12.2. When I try to install my project I get warning messages but installs successfully $ python setup.py install --user if I use distutils I get below message which probably its setup doesn't have kwarg entry_points. /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py: 267: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) but when I try to install

Create package with cython so users can install it without having cython already installed

核能气质少年 提交于 2020-05-25 22:05:47
问题 I have a question. I would like to distribute my cython-powered packages, but I see no easy way to build them in setup.py. I would like setup.py to: most importantly: install my package without cython (from pre-generated C files or by installing cython beforehand) rebuild (run cythonize) package on sdist not need to hard-code list of my cython modules (just use glob or something) be able to work without .c files (should not be stored in git) or .pyx (might not be distributed). at least one of

Create package with cython so users can install it without having cython already installed

与世无争的帅哥 提交于 2020-05-25 22:03:58
问题 I have a question. I would like to distribute my cython-powered packages, but I see no easy way to build them in setup.py. I would like setup.py to: most importantly: install my package without cython (from pre-generated C files or by installing cython beforehand) rebuild (run cythonize) package on sdist not need to hard-code list of my cython modules (just use glob or something) be able to work without .c files (should not be stored in git) or .pyx (might not be distributed). at least one of

Create package with cython so users can install it without having cython already installed

浪子不回头ぞ 提交于 2020-05-25 22:03:55
问题 I have a question. I would like to distribute my cython-powered packages, but I see no easy way to build them in setup.py. I would like setup.py to: most importantly: install my package without cython (from pre-generated C files or by installing cython beforehand) rebuild (run cythonize) package on sdist not need to hard-code list of my cython modules (just use glob or something) be able to work without .c files (should not be stored in git) or .pyx (might not be distributed). at least one of

Create package with cython so users can install it without having cython already installed

懵懂的女人 提交于 2020-05-25 22:03:46
问题 I have a question. I would like to distribute my cython-powered packages, but I see no easy way to build them in setup.py. I would like setup.py to: most importantly: install my package without cython (from pre-generated C files or by installing cython beforehand) rebuild (run cythonize) package on sdist not need to hard-code list of my cython modules (just use glob or something) be able to work without .c files (should not be stored in git) or .pyx (might not be distributed). at least one of

How to install python-distutils

╄→гoц情女王★ 提交于 2020-05-09 07:44:08
问题 I am running ubuntu 20.04 with python 3.8, 3.7, and 3.6 installed. I am trying to install some packages using pip on 3.7 and 3.6 versions using 'python3.7 -m pip install package' but, I am getting ModuleNotFoundError: No module named 'distutils.util error. I have disutils installed but it works for python 3.8. Is there a workaround to install packages on python 3.7 and 3.6? 回答1: 1) Run update command to update package repositories and get latest package information sudo apt-get update -y 2)

Python, ImportError: undefined symbol: g_utf8_skip

烈酒焚心 提交于 2020-02-24 11:13:07
问题 There are like tens of similar questions on StackOverflow, but after several hours of lurking I finally gave up. So I'm trying to write a C extension for Python. Let's call it mylib . Here is the header file: mylib.h #ifndef mylib_H #define mylib_H #include <Python.h> < ... > #include <glib.h> < ... > and setup.py: from distutils.core import setup, Extension include_list = [ "/usr/include/glib-2.0", "-lglib-2.0", "/usr/lib/x86_64-linux-gnu/glib-2.0/include" ] module = Extension('mylib', [

Pybuilder - Non-python files are not packaged

蓝咒 提交于 2020-02-06 03:39:08
问题 My current project is in python. For build package generation + unit test running, I'm using Pybuilder utility and it is pretty cool. I used the wheel distribution to install the module in other systems. There exist a config file from which certain settings are read by the application. settings.ini file is in following path, PROJECT-ROOT |---- src |-main |-python |- foo |- conf | |- settings.ini | |-test.py |-access.py pybuilder automatically creates setup.py from the build.py script. The

python distutils not include the SWIG generated module

拥有回忆 提交于 2020-01-23 04:21:12
问题 I am using distutils to create an rpm from my project. I have this directory tree: project/ my_module/ data/file.dat my_module1.py my_module2.py src/ header1.h header2.h ext_module1.cpp ext_module2.cpp swig_module.i setup.py MANIFEST.in MANIFEST my setup.py : from distutils.core import setup, Extension module1 = Extension('my_module._module', sources=['src/ext_module1.cpp', 'src/ext_module2.cpp', 'src/swig_module.i'], swig_opts=['-c++', '-py3'], include_dirs=[...], runtime_library_dirs=[...],