FAQ Database Discussion Community

setup.py check if non-python library dependency exists

I'm trying to make a setup.py for cgal-bindings. To install this, the user needs to have at least a certain version of CGAL. In addition, CGAL has a few optional targets that should be built if the user has some libraries (like Eigen3). Is there a cross-platform way in Python...

Dependencies from git aren't being installed?

p0 depends on p1, which in turn depends on p2. p2 isn't getting installed, everything else is. I.e.: I get an ImportError in reference to p2 when I deploy p0 via Heroku. Note that all have lines in their requirements.txt like so: git+http://github.com/project/package Additionally I have tried putting everything in...

What's the minimal directory structure to make setuptools work with one_file.py?

one_file.py contains some general functions, classes, and a main(). I'd like to make it pip installable with a command line script that calls the main() function. What's a directory structure and setup.py that will do this?...

Including logging.conf in setup.py?

In my package_name subdirectory (one below "setup.py") I have a "logging.conf" file. How do I include it in my setup? Attempt from distutils.sysconfig import get_python_lib data_files=[(path.join(get_python_lib(), package_name), path.join(path.dirname(__file__), package_name, 'logging.conf')) Preferably it should be something simple like: data_files = [(package_name, path.join('.', package_name, 'logging.conf'))] Error error: can't copy 'c': doesn't exist...

Automate Python application installation

I have a Java application that should interact with Python agents installed on remote machines. My main application has a SSH access to these remote machines. To make user's live simpler, I want to automate process of agent installation, so user can just push button and main application connects, install...

Does _spawn_posix in distutils always raise an error?

I'm afraid to send this to the distutils mailing list, because I'm pretty sure I'm making a dumb misinterpretation. Here is the function _spawn_posix in distutils version 2.7.9: def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return executable = cmd[0] exec_fn = search_path and os.execvp or os.execv env =...

Install a CMake macro script from within a python package install script (using setup.py)

So I have a Python package – it’s all set up on PyPI, and on GitHub, no problem. This is something I’m relatively familiar with. What is unknown to me is: the notion of installing a CMake script as part of the python package install process. The python package in...

how do i control to which python to install a package

i'm on win7/64, and have some pythons already, but want to be installing mosek to a new WinPython >where python C:\Users\nlab\Downloads\WinPython-64bit-\python-2.7.9.amd64\python.exe C:\Python27\python.exe C:\Program Files (x86)\LilyPond\usr\bin\python.exe i'm following these instructions >cd C:\Program Files\Mosek\7\tools\platform\win64x86\python\2 >python setup.py build --build-base c:\Users\nlab install --user running build running build_py creating c:\Users\nlab\lib creating c:\Users\nlab\lib\mosek copying mosek\array.py...

What does `python setup.py check` actually do?

What exactly does python setup.py check actually do?

Referring to existing distutils options inside setup.cfg and setup.py

I am using Python 2.7 with Distutils to distribute and install my self-created package. My setup.cfg looks like this: [install] prefix=/usr/local/MODULENAME record=installation.txt I have two questions: Is it possible to refer to variables set in setup.cfg (but also using command line options) when defining other setup.cfg options? For example, for:...

python 3.4 py2exe is not working or doing anything

I am trying to run a python file that I create as an executable or .exe in windows. I want to run this code in another computer that does not have nor need python, or pyserial or PIL or any other software, My code creates a Gui that do stuff...

Python cx_freeze 4.3.4: Setting targetName causes errors

I am very new to cx_freeze and I am trying to understand it a bit better, I have this setup.py file: import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]} setup( name = "guifoo", version...