setuptools

Howto install distribute for Python 3

I am trying to install distribute using ActivePython 3.1.2 on Windows. Running python distribute_setup.py as described on the cheese shop give me: No setuptools distribution found running install Traceback (most recent call last): File "setup.py", line 177, in scripts = scripts, File "C:\Dev\Python_x86\3.1\lib\distutils\c...

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

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):...

python: simple example for a python egg with a one-file source file?

I'm not quite sure how to build a really simple one-file source module. Is there a sample module out there one the web somewhere which can be built as a python .egg? From the setuptools page it looks pretty simple, you just have your setup.py file and then at least one other .py file somewhere, and I can build an .egg file OK, and even ...

Setuptools not passing arguments for entry_points

I'm using setuptools for a Python script I wrote After installing, I do: $ megazord -i input -d database -v xx-xx -w yy-yy Like I would if I was running it ./like_this However, I get: Traceback (most recent call last): File "/usr/local/bin/megazord", line 9, in <module> load_entry_point('megazord==1.0.0', 'console_scripts', '...

file layout and setuptools configuration for the python bit of a multi-language library

So we're writing a full-text search framework MongoDb. MongoDB is pretty much javascript-native, so we wrote the javascript library first, and it works. Now I'm trying to write a python framework for it, which will be partially in python, but partially use those same stored javascript functions - the javascript functions are an intrinsi...

Can I use setuptools without permissions to /usr/local etc

I want to use some packages (i.e., IPython or zdaemon), butI am doing this on a system (my university) that does not give me permissions for /usr/local, /usr/bin, or all these directories. Is there a way around it? ...

Having a Python package install itself under a different name

I'm developing a package called garlicsim. (Website.) The package is intended for Python 2.X, but I am also offerring Python 3 support on a different fork called garlicsim_py3.(1) So both of these packages live side by side on PyPI, and Python 3 users install garlicsim_py3, and Python 2 users install garlicsim. The problem is: When thi...

Can I set env vars for dependencies in setup-tools?

Is it possible to set env vars to be used by dependencies set in the setup.py file of a package? Specifically; the lxml package is a dependency of one of my packages. To help ease deployment I want to set STATIC_DEPS=true and some CFLAGS for lxml in the setup.py file for my package, so that our users can just easy_install my-package wi...

unattended install of binary python packages (modules) for windows

Is there no sane way to peform a scripted install of binary python packages for windows? Unfortunately it seems like several essential windows python packages like pywin32 and py2exe are only available as EXE's not MSI's (and as far as I know only the latter are scriptable). Easy_install/pip also seems no use since they apparently only f...

Including Bash autocompletion with setuptools

I've got a couple packages in PyPI, and I'd like to include autocompletion features with both of them. How would you check that Bash autocompletion should be installed at all (check for /etc/bash_completion, maybe?), and how would you install it with setup.py (preferably using setuptools)? ...

Installing Jinja2 on a server without root access

I am trying to install Jinja2 on a web server. I tried running the command "easy_install Jinja2" as they suggested and got an error: [Errno 13] Permission denied: '/usr/lib/python2.5/site-packages/test-easy-install-15897.write-test' I thought that since this was a permission problem, I tried the same thing with "sudo". I was asked ...

Python packages installation in Windows

I recently began learning Python, and I am a bit confused about how packages are distributed and installed. I understand that the official way of installing packages is distutils: you download the source tarball, unpack it, and run: python setup.py install, then the module will automagically install itself I also know about setuptools ...

setuptools easyinstall mysql-python-1.2.3

Hi everybody I have read a bunch of threads on setuptools here. A lot of people seem not to like it very much. But I need to install MySQL-python-1.2.3. and when I do that I get this error: MySQL-python-1.2.3 X$ python setup.py cleanTraceback (most recent call last): File "setup.py", line 5, in <module> from setuptools ...

How do I install an old version of Django on virtualenv?

This may sound like a stupid question, since the very purpose of virtualenv is to this exactly: Installing some specific version of a package (in this case Django) inside the virtual environment. But it's exactly what I want to do, and I can't figure it out. I'm on Windows XP, and I created the virtual environment successfully, and I'm ...

Why use pip over easy_install?

A tweet reads: Don't use easy_install, unless you like stabbing yourself in the face. Use pip. Why use pip over easy_install? Doesn't the fault lie with PyPI and package authors mostly? If an author uploads crap source tarball (eg: missing files, no setup.py) to PyPI, then both pip and easy_install will fail. Other than cosmet...

How to easy_install egg plugin and load it without restarting application?

I'm creating an app that downloads and installs its own egg plugins, but I have a problem loading the egg after easy_install extracts it into place. This is how it works now: App downloads egg into temp folder Installs egg with setuptools.command.easy_install.main() into ~/.app/plugins folder (which is pointed by a pth on dist-packages...

how do you include modified 3rd party modules when writing setup.py files?

I wrote a standalone script depends on a few modified modules. the directory structure looks like this: client setup.py tsclient __init__.py tsup utils.py mutagen __init__.py blah.py blah.py ... colorama __init__.py blah.py blah.py ... currently, if I just symlink...

How to extend distutils with a simple pre uninstall script?

I found Question#1321270 for post install. My main target for the moment is bdist_wininst, but i did not find anything related to uninstall... For clarification: I want to register a com server after installation and de-register it before uninstall. Extended answer: ars' answer seems correct, however, for the completeness of things (I ...

Where to manually install python files

I'm having trouble with setuptools in a larger project where a python package has to be "constructed" from several debian packages (each containing a subpackage of the "main" package). Thus we decided to install the files manully instead of using "setup.py install", but we are unsure of the location to use. We first used a directory in /...

What's the best layout for a python command line application?

What is the right way (or I'll settle for a good way) to lay out a command line python application of moderate complexity? I've created a python project skeleton using paster, which gave me a few files to start with: myproj/__init__.py MyProj.egg-info/ dependency_links.txt entry_points.txt PKG-INFO SOURCES.txt top_level.txt zip-s...