setuptools

trouble with creating a virtual environment in Windows 8, python 3.3

血红的双手。 提交于 2019-12-05 05:09:36
I'm trying to create a virtual environment in Python, but I always get an error no matter how many times I re-install python-setuptools and pip. My computer is running Windows 8, and I'm using Python 3.3. E:\Documents\proj>virtualenv venv --distribute Using base prefix 'c:\\Python33' New python executable in venv\Scripts\python.exe Installing setuptools, pip... Complete output from command E:\Documents\proj\venv\Scripts\python.exe -c "imp ort sys, pip; pip...ll\"] + sys.argv[1:])" setuptools pip: Traceback (most recent call last): File "<string>", line 1, in <module> File "<frozen importlib.

Install numpy + pandas as dependency in setup.py

穿精又带淫゛_ 提交于 2019-12-05 04:40:32
Installing numpy + pandas via setuptools as dependency in setup.py does not work for me. It is not about missing dependencies. If I install numpy via pip install numpy and afterwards python setup.py develop everything works fine. If I understand the setuptools documentation right, all packages are build first and then installed. So numpy is build, but not installed when pandas is build. As a workaround I added numpy to my setup_requires . That works fine, but is obviously not a very clean solution. Does anybody know a clean solution (Linux only is fine) for installing numpy + pandas via

How do I distribute fonts with my python package?

人走茶凉 提交于 2019-12-05 04:03:16
问题 I have created a package called clearplot that wraps around matplotlib. I have also created a nice font that I want to distribute with my package. I consulted this section of the Python Packaging User guide, and determined that I should use the data_files keyword. I chose data_files instead of package_data since I need to install the font in a matplotlib directory that is outside of my package. Here is my first, flawed, attempt at a setup.py file: from distutils.core import setup import os,

Distutils appharently fails with a (working) SWIG extension

拜拜、爱过 提交于 2019-12-05 03:52:57
I am wrapping via SWIG a C library in a python module, here called "myExample". If I compile: $swig -python myExample.i $gcc -c myExample_wrap.c -I /usr/lib/python2.7 -fPIC -std=c99 $ld -shared myExample_wrap.so -llapacke -o _myExample.so I obtain a full working module (liblapacke is necessary for some functions I used). Now I'd like to make this module installable via "pip install". According to the distutils section ( https://docs.python.org/2.7/distutils/setupscript.html ), I wrote my setup.py file: from distutils.core import setup, Extension setup(name='myExample', version='0.1', ext

Directly call distutils' or setuptools' setup() function with command name/options, without parsing the command line?

假如想象 提交于 2019-12-05 02:58:37
I'd like to call Python's distutils' or setuptools' setup() function in a slightly unconventional way, but I'm not sure whether distutils is meant for this kind of usage. As an example, let's say I currently have a 'setup.py' file, which looks like this (lifted verbatim from the distutils docs--the setuptools usage is almost identical): from distutils.core import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='gward@python.net', url='http://www.python.org/sigs/distutils-sig/', packages=['distutils', 'distutils.command'

Difference between pip3 and `python3 setup.py install` regarding cmdclass argument

大兔子大兔子 提交于 2019-12-05 02:57:52
I tried to configure my package such that a script is executed on the installation process. Therefore, I inherited from setuptools.command install and created my custom class ActionOnInstall to do stuff when package is installed. This class is called via setuptools setup() argument cmdclass as described here . A minimal example of such a setup.py file looks like from setuptools import find_packages, setup from setuptools.command.install import install class ActionOnInstall(install): def run(self): print("Call install.run(self) works!") install.run(self) setup(name='name', cmdclass={ 'install':

Namespace packages with a core part?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 02:43:01
This question follows up The way to make namespace packages in Python and How do I create a namespace package in Python? . Note PEP 420 , and the distribute docs , which state: You must NOT include any other code and data in a namespace package’s __init__.py . Even though it may appear to work during development, or when projects are installed as .egg files, it will not work when the projects are installed using “system” packaging tools – in such cases the __init__.py files will not be installed, let alone executed. This all seems to make it impossible to have a "main library" package with

Multiple projects from one setup.py?

时间秒杀一切 提交于 2019-12-05 02:26:52
My current setup.py (using setuptools) installs two things, one is tvdb_api (an API wrapper), the other is tvnamer (a command line script) I wish to make the two available separately, so a user can do.. easy_install tvdb_api ..to only get the API wrapper, or.. easy_install tvnamer ..to install tvnamer (and tvdb_api, as a requirement) Is this possible without having two separate setup.py scripts? Can you have two separate PyPi packages that come from the same python setup.py upload command..? Rick Copeland setup.py is just a regular Python file, which by convention sets up packages. By

Can't build wheel - error: invalid command 'bdist_wheel'

烂漫一生 提交于 2019-12-05 02:17:48
I've tried everything in this very related question: Why can I not create a wheel in python? But I still get: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_wheel' Context: $ pip --version pip 8.1.1 from /home/bdillman/proj/fashion/lib/python3.5/site-packages (python 3.5) $ python -c "import setuptools; print(setuptools.__version__)" 18.2 $ python --version Python 3.5.1 $ which python /home/bdillman/workspace/fashion/bin/python $ pip list Mako (1.0.4)

Pyinstaller on a setuptools package

五迷三道 提交于 2019-12-05 01:31:53
I'm attempting to run PyInstaller on a CLI app I am building in Python using the Click library. I'm having trouble building the project using PyInstaller. PyInstaller has a document in their GitHub wiki titled Recipe Setuptools Entry Point , which gives information about how to use PyInstaller with a setuptools package, which I'm using for this project. However, it seems it cannot find the base module when I run pyinstaller --onefile main.spec . My question is: Is the problem simply an issue with the folder structure I have? Does the Recipe Setuptools Entry Point assume a certain file