I want to make a Windows installer - using distutils - for the Python
code I have made so far. Related to this, I have some questions about
the "best way" to do this. The project is a test platform that should be
used for internal use in our company.
What are my problems ?
* I am using Nose, PyQt etc. : how do I make sure that these packages
are installed with my installer ? The main problem is here that most of
the PC's in the company are behind a firewall that not allows them to
download these packages from the internet (internet browsers are handled
by a remote desktop)
* Maybe related to the previous issue : I have written a plugin for
Nose; this plugin needs to be "registered" with Nose (manually I do this
with easy_install); can I do this also with distutils ?
* I am also using SWIG for some code written in C++. I have already read
the documentation of distutils where they advise me to build my code
with distutils. Problem is that this C++ project is already rather large
and that the .pyd is already generated (so I'd rather would not like to
declare all my .i and .cpp files in a setup.py file). Do I have to
include the generated .pyd, .lib and .py as "package data" into setup.py
or are there better ways ?
Maybe this sounds trivial to a lot of you, but as I am using Python for
1.5 months, I'd like to have some help from specialists ...
Thanks in advance !
Kind regards,
Benedikt Naessens.
Disclaimer
This e-mail and its attachments is intended only for the person(s) or entity to which it is addressed. If you receive this e-mail by mistake, please delete this e-mail from your system and destroy all copies of it.
It may contain confidential and/or privileged information. You should not copy it or use it for any purpose nor disclose its contents to any person unless allowed by a written document between the sender and the addressee.
At 04:21 PM 12/9/2008 +0000, Paul Moore wrote:
>The setuptools download page says that you should install setuptools
>from the provided .exe file on Windows. However, for Python 2.6, there
>is only a .egg file. Where should I go to get a Python 2.6 setuptools
>.exe installer?
I'd suggest downloading the source and running "python setup.py
bdist_wininst" to make one.
The setuptools download page says that you should install setuptools
from the provided .exe file on Windows. However, for Python 2.6, there
is only a .egg file. Where should I go to get a Python 2.6 setuptools
.exe installer?
Thanks,
Paul.
Hi All,
Is it just me or does buildout's bootstrap.py not work offline, even if
the latest versions of buildout and setuptools are available in
buildout:egg-directory?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
Hiya! What are the plans for Python 3 support for setuptools and
zc.buildout? I looked through the archives quickly and couldn't see
anything.
If none, does anybody mind if I have a go at making 3.0 support? In
fact, I already had a go this August, as a quick test, so I think I
have an idea of what I'm up against. ;-)
--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
New submission from lregebro <regebro(a)gmail.com>:
In Python 2.6, the default of the testRunner parameter when calling
unittest.main is no longer None, but is instead TextTestRunner. Calling it with
None explicitly says to use None as a test runner, so that will fail, meaning
you can't run "python2.6 setup.py test", instead you get a AttributeError:
'NoneType' object has no attribute 'run' in unittest.py line 861.
There are two solutions, either set the runner variable to TextTestRunner for
versions > 2.5, or not pass in the parameter when it is None. I'm not sure which
one is seen as neater, so I'll provide both at patches, version A and B.
----------
messages: 216
nosy: lregebro
priority: bug
status: unread
title: [PATCH] python setup.py test in python2.6
_______________________________________________
Setuptools tracker <setuptools(a)bugs.python.org>
<http://bugs.python.org/setuptools/issue56>
_______________________________________________
Phillip J. Eby <pje <at> telecommunity.com> wrote:
> From reading your setup script, I don't understand why your package
> needs a .pth file of its own, let alone why it's writing it directly
> in the setup script. I would expect it to work correctly if you
> simply delete that portion of the setup script. In fact, it works
> for me that way.
Without the .pth file, the libraries in the folder pyspread are not found.
If I leave it out, the program fails to start (after installation finished
successfully).
> > One other thing you need to change if you want easy_install to handle
> > dependencies:
> >
> > requires=['numpy (>=1.1)', 'wx (>=2.7)'],
> Either change this line (or add another) saying:
>
> install_requires=["numpy>=1.1", "wx>=2.7"],
This does not work at all for me. I do have all dependencies met (I am
installing everything else via apt) but easy_install does not recognize it and
throws a DistributionNotFound: wx>=2.7 *after* installation.
>Also note that this line is superfluous (neither distutils nor
>setuptools need it):
>
>> package_dir={'pyspread': 'pyspread'},
I have removed that sucessfully.
> And of course, delete the entire block below; as far as I can tell,
> it's not needed for distutils or setuptools.
>
> >import distutils.sysconfig
> >try:
> > pthfile = open(get_python_lib() + "/pyspread.pth", 'w')
> > pthfile.write("pyspread")
> > pthfile.close()
> >except IOError:
> > print 'Creation of ' + distutils.sysconfig.get_python_lib() + '
> > pyspread.pth
> >failed.'
And how do I get the pyspread.pth file created?
Best Regards
Martin
Last October, I sent an email to this list asking how to install modules
which use setuputils so that modules are shipped in a way that is compatible
with Solaris packaging. It was recommended to me to run "setup.py install"
with the "--root=/foo" argument and this causes the files to be installed
directly to the filesystem and not in an Egg format.
For example, when installing cssutils this way, it installs the python files
to /usr/lib/python2.4/site-packages/cssutils, and not in Egg format. This
seems to work great, so thanks for the help with that.
However, installing this way seems to also install various egg related files
which I am not sure are actually needed when delivering in this manner. For
example, installing CSSutils or simplejson puts directories with names like
these on the filesystem:
/usr/lib/python2.4/site-packages/cssutils-0.9.5.1-py2.4.egg-info
/usr/lib/python2.4/site-packages/simplejson-2.0.4-py2.4.egg-info
These directories contain files like PKG-INFO, SOURCES.txt,
dependency_links.txt, entry_points.txt, and top_level.txt.
Is there any value in shipping these files when not delivering as Eggs, or
could they safely be just removed? Should they not be installed when
building with the "--root" option, or is there some other way to disable
having them be installed?
Thanks,
Brian
Hi there,
in buildout I can define only one alternative index server using 'index
= http://pypi.zopyx.com'. Now we are in the situation where we are
running two internal index servers (one for our own internal packages
and one PyPI mirror). Is there some reason for this limitation? I assume
this is a limitation/feature coming from setuptools?
Andreas
--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info(a)zopyx.com - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting
Folks:
I pointed easy_install at this server:
http://allmydata.org/trac/tahoe/wiki/PackageMirror
This is very cool because the files are stored on a secure,
decentralized storage grid. (Details on http://allmydata.org ,
especially http://allmydata.org/~zooko/lafs.pdf .)
However, sometimes easy_install issues an HTTP GET request for a file
with "?t=info" tacked onto the end. http://pypi.python.org and
apache ignore that query arg and just serve up the file, but the
tahoe web server just so happens to use ?t=info for something else
(the "More Info" links on the directory listing there), so this
request fails to serve up the file.
My question is: why does easy_install append "?t=info" to the end of
those requests?
Regards,
Zooko
---
http://allmydata.org -- Tahoe, the Least-Authority Filesystem
http://allmydata.com -- back up all your files for $10/month