How do I compile a C-Python module such that it is local to another? E.g. if I have a module named "bar" and another module named "mymodule", how do I compile "bar" so that it imported via "import mymodule.bar"?
(Sorry if this is poorly phrased, I wasn't sure what the proper term for it was.)
I tried the following in setup.py, but it d...
I have an open-source Python project (called GarlicSim), and I maintain 4 different versions of it for Python versions 2.4, 2.5, 2.6 and 3.1. Yes, maybe it's unusual, but I like using as much features as possible. I keep them in 4 different forks of the repository.
Now I want to upload my project to the cheeseshop. What's the way to do ...
I have a library called "example" that I'm installing into my global site-packages directory. However, I'd like to be able to install two versions, one for production and one for testing (I have a web application and other things that are versioned this way).
Is there a way to specify, say "python setup.py stage" that will not only ins...
I'm using Distribute's pkg_resources.require() in my project to check if prerequisites are installed on the user's machine. One of the prerequisites is wxPython. But when I try pkg_resources.require('wxPython'), I'm getting the DistributionNotFound error, even though it's definitely installed and operable on my machine.
I also tried the...
I'm trying to upload an MSI binary distribution of my project to the cheeseshop. I'm doing setup.py bdist_msi register upload. It builds the project and the setup script finishes, but then I get:
error: garlicsim-0.1: No such file or directory
And no .msi file is uploaded to PyPi.
Any clue?
...
I'm trying to upload my package to PyPI. It asks me to identify, I do, it gives an OK response (which doesn't happen unless the identification is right), but then it claims I didn't identify! Why?
[...]
removing 'build\bdist.win32\egg' (and everything under it)
running register
We need to know who you are, so please choose either:
1. u...
I need to compile ICU using it's own build mechanism. Therefore the question:
How can I run a Makefile from setup.py? Obviously, I only want it to run during the build process, not while installing.
...
When I build a c extension using python setup.py build, the result is created under a directory named
build/lib.linux-x86_64-2.6/
where the part after lib. changes by the OS, CPU and Python version.
Is there a way I can access the appropriate string for my current architecture from python? Hopefully in a way that is guaranteed to mat...
I used distutils to install my python package, with this setup.py :
import distutils.core
args = {
'name' : 'plugh',
'version' : '1.0',
'scripts' : [ "scripts/plugh" ],
'packages': [ "plugh" ],
}
d = distutils.core.setup(
**args
)
On linux/mac, it works as expected:
% plugh
hel...
I have a python module which generates large data files which I want to cache on disk for future use. The cache is likely to end up some hundreds of MB for a normal user, but save a lot of computation time.
The files aren't distributed with the module, but are generated the first time the code is run with a given set of parameters.
So ...
I'm writing a python wrapper for an old proprietary system with header files, a .lib and some .dlls available to me on Windows. The library that is referenced is in .lib format (header files have references to Borland C & MSC)
I've attempted to convert the .lib to a .a file with pexports -- it complains about not being able to load PE ...
I have a Python project with mutiple extension modules written in C, which talk to a third-party library. However, depending on the user's environment and options some modules should not be built, and some compiler flags should be enabled/disabled. The problem is that I have to build the list of extension modules before I call setup(),...
I'm trying to distribute this app that I wrote in python. The application consists of 2 python scripts. 2 .glade files and 1 .png file.
Here is my dir structure on this project
vasm/
vasmcc.py
src/
vasm.py
gui/
vasm.glade
vasmset.glade
logo.png
vasmcc is just the python script for the gui... th...
The last time I had to worry about installing Python packages was two years ago working with Enthought, NumPy and MayaVi2. That experience gave me lingering nightmares related to quirky behavior installing & updating Python packages in non-standard locations (in $HOME/usr/local2.6/, for example).
Anyway, my work is taking me back to in...
I am using buildout. I am using it to install openerp. I would like the scripts that openerp creates to run itself available in ${buildout:location}/bin
I tried zerokspot.recipe.distutils and collective.recipe.distutils
How would I get the scripts built in bin?
...
Some useful Python packages are broken on pypi, and the only acceptable version is a particular revision in a revision control system. Can that be expressed in setup.py e.g
requires = 'svn://example.org/useful.package/trunk@1234' ?
...
For a package of mine, I have a README.rst file that is read into the setup.py's long description like so:
readme = open('README.rst', 'r')
README_TEXT = readme.read()
readme.close()
setup(
...
long_description = README_TEXT,
....
)
This way that I can have the README file show up on my github page every time I commit...
I'm trying to deploy OpenERP with a buildout and my own piece of code. In fact I would like to build a complete deployement structure allowing me to use OpenERP with custom modules and patch.
First of all, before adding any personnal configuration, I was trying to create a buildout which will have the responsability to configure everyth...
How do I write the setup.cfg file for distutils such that setup.py bdist_rpm generates a PGP-signed RPM? I'd like to be able to offer signed packages without needing to add a second build system on top of distutils.
...
Setuptools lets you list requirements for optional features
# mypackage
'extras_require' : { 'PDF' : ['reportlab'], 'DOCX' : ['docxlib'] }
and another package can specify 'requires' : [ 'mypackage[PDF]' ].
If another package wants to require more than one extra from the first package, can it ask for 'requires' : [ 'mypackage[PDF, DOC...