build

Make (install from source) python without running tests

Make (install from source) python without running tests Question: I compiling python from source tar. All works good, but tests running 2 hours and two times. How to bypass these tests? 0:16:20 [178/405] test_inspect 0:16:26 [179/405] test_int 0:16:27 [180/405] test_int_literal 0:16:27 [181/405] test_io 0:18:18 [182/405] test_ioctl — test_io passed in 1 min 51 sec 0:18:19 …

Total answers: 6

Is there a way to compile a python application into static binary?

Is there a way to compile a python application into static binary? Question: What I’m trying to do is ship my code to a remote server, that may have different python version installed and/or may not have packages my app requires. Right now to achieve such portability I have to build relocatable virtualenv with interpreter …

Total answers: 7

setup_requires with Cython?

setup_requires with Cython? Question: I’m creating a setup.py file for a project with some Cython extension modules. I’ve already gotten this to work: from setuptools import setup, Extension from Cython.Build import cythonize setup( name=…, …, ext_modules=cythonize([ … ]), ) This installs fine. However, this assumes Cython is installed. What if it’s not installed? I understand …

Total answers: 3

How to add pre and post-process actions to SCons build?

How to add pre and post-process actions to SCons build? Question: I’m trying to add pre and post-process actions when building a project with SCons. The SConstruct and SConscript files are at the top of the project. Pre-process actions: Generating code(by calling different tools): -> without knowing the exact files that will be generated after …

Total answers: 1

How to make setup.py install multiple top-level packages?

How to make setup.py install multiple top-level packages? Question: I have a python package that I would like to organize like so: root/ setup.py package1/ __init__.py package2/ __init__.py package3/ __init__.py I would like setup.py to install package1, package2, and package3 into the correct site-packages/ directory as top level packages, so that I could execute import …

Total answers: 2

Issue building cx_Oracle – libclntsh.so.11.1 => not found

Issue building cx_Oracle – libclntsh.so.11.1 => not found Question: I’m trying to build cx_Oracle for a Python 2.7.2 and Oracle 11g installation but the built cx_Oracle.so cannot find libclntsh.so.11.1 so importing cx_Oracle in Python fails. /mypath/cx_Oracle-5.1.1/build/lib.linux-x86_64-2.7-11g]$ ldd cx_Oracle.so libclntsh.so.11.1 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ae9be290000) libc.so.6 => /lib64/libc.so.6 (0x00002ae9be4ab000) /lib64/ld-linux-x86-64.so.2 (0x000000389b600000) I have libclntsh.so.11.1 …

Total answers: 5

How do I use data in package_data from source code?

How do I use data in package_data from source code? Question: In setup.py, I have specified package_data like this: packages=[‘hermes’], package_dir={‘hermes’: ‘hermes’}, package_data={‘hermes’: [‘templates/*.tpl’]}, And my directory structure is roughly hermes/ | | docs/ | … | hermes/ | | __init__.py | code.py | templates | | python.tpl | | README | setup.py The problem …

Total answers: 1

MANIFEST.in ignored on "python setup.py install" – no data files installed?

MANIFEST.in ignored on "python setup.py install" – no data files installed? Question: Here’s my stripped-down setup.py script with non-code stuff removed: #!/usr/bin/env python from distutils.core import setup from whyteboard.misc import meta setup( name = ‘Whyteboard’, version = meta.version, packages = [‘whyteboard’, ‘whyteboard.gui’, ‘whyteboard.lib’, ‘whyteboard.lib.pubsub’, ‘whyteboard.lib.pubsub.core’, ‘whyteboard.lib.pubsub.utils’, ‘whyteboard.misc’], py_modules = [‘whyteboard’], scripts = [‘whyteboard.py’], ) MANIFEST.in: …

Total answers: 6

Cleaning build directory in setup.py

Cleaning build directory in setup.py Question: How could I make my setup.py pre-delete and post-delete the build directory? Asked By: Ram Rachum || Source Answers: Does this answer it? IIRC, you’ll need to use the –all flag to get rid of stuff outside of build/lib: python setup.py clean –all Answered By: Matt Ball For pre-deletion, …

Total answers: 4

Matplotlib Build Problem: Error C1083: Cannot open include file: 'ft2build.h'

Matplotlib Build Problem: Error C1083: Cannot open include file: 'ft2build.h' Question: ft2build.h is located here: C:Program FilesGnuWin32include Initially, I made the same mistake as here: Fatal Error C1083: Cannot Open Include file: 'tiffio.h': No such file or directory VC++ 2008 but since then, I’ve corrected that particular error (I’ve added the above directory to the …

Total answers: 11