From jim at zope.com Sun Apr 1 00:19:42 2012 From: jim at zope.com (Jim Fulton) Date: Sat, 31 Mar 2012 18:19:42 -0400 Subject: [Distutils] [buildout] branches languishing? (site-packages and distutils scripts) In-Reply-To: References: <4B55864E.3080108@simplistix.co.uk> <1099b90b1001190406u52ba46fbs284e1a2a54489de2@mail.gmail.com> <1099b90b1001190816l6af94f67h9074435418034951@mail.gmail.com> <871uohpybv.fsf@transitory.lefae.org> <20120326101057.227912e7@vincent-tkpad> Message-ID: On Mon, Mar 26, 2012 at 10:45 AM, Hanno Schlichting wrote: > On Mon, Mar 26, 2012 at 4:38 PM, Jim Fulton wrote: >> On Mon, Mar 26, 2012 at 7:54 AM, Hanno Schlichting wrote: >>> That'll work just fine, as long as the new buildout >>> puts the magic into its top level __init__.py and has no other code >>> there. >> >> No, it won't. You can't count on the order that namespace packages get >> scanned, so you really can't have code in __init__.py if you want to >> count on it getting installed. > > That's my point. As long as every buildout/__init__.py contains the > setuptools namespace code and nothing else, all is fine. So as long as > the new buildout distribution does the same, it'll all work. > > I'm not aware of any problems with having modules directly inside a > namespace package. So a buildout/easy_install.py should be importable > via "from buildout import easy_install". OK, right that's supposed to work. Let's try it. :) Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton From sandro at e-den.it Sun Apr 1 09:18:54 2012 From: sandro at e-den.it (Alessandro Dentella) Date: Sun, 1 Apr 2012 09:18:54 +0200 Subject: [Distutils] Buildout & develop-eggs troubles In-Reply-To: References: <20120331184823.GA25740@ubuntu> Message-ID: <20120401071854.GB25740@ubuntu> Thanks Jim, > If, as I suspect, the project name is 'jumbo-core', rather > than 'jumbo', then you need to add jumbo-core to your > eggs option (on a separate line). this solves indeed my problem. I realize I could have understood it just looking at others egg names (e.g. python-dateutils). sandro *:-) PS: more questions in differente threads... ;-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy From sandro at e-den.it Sun Apr 1 10:47:54 2012 From: sandro at e-den.it (Alessandro Dentella) Date: Sun, 1 Apr 2012 10:47:54 +0200 Subject: [Distutils] Buildout: adding a link to a compiled library: uno Message-ID: <20120401084754.GC25740@ubuntu> Hi, I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package. Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory. Which is the best way to accomplish a simple setup as this one under buildout? thanks in advance sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy From jim at zope.com Sun Apr 1 21:30:06 2012 From: jim at zope.com (Jim Fulton) Date: Sun, 1 Apr 2012 15:30:06 -0400 Subject: [Distutils] [buildout] branches languishing? (site-packages and distutils scripts) In-Reply-To: References: <4B55864E.3080108@simplistix.co.uk> <1099b90b1001190406u52ba46fbs284e1a2a54489de2@mail.gmail.com> <1099b90b1001190816l6af94f67h9074435418034951@mail.gmail.com> <871uohpybv.fsf@transitory.lefae.org> Message-ID: On Sun, Mar 25, 2012 at 5:49 PM, Hanno Schlichting wrote: > On Sun, Mar 25, 2012 at 11:31 PM, Jim Fulton wrote: >> Hanno suggested creating a buildout organization. ??I'm up with that. >> Maybe someone can create one and include me. :) > > In case you want it, there you go: https://github.com/buildout/buildout OK, I've populated this. I: 1) Got rid of some old svn branches that were allready merged or abandoned. 2) Ran svn2git This hurt. Your ~/.svn2git/authors file has to be complete or the conversion stops before completion. For people who didn't respond to my spam for git emails, I had to make due with svn.zope.org repo emais. svn2git copied branches that were deleted in svn. I deleted the junk branches in git. After much flailing and with some help, I removed some bogus remote tracking branches created by svn2git that made working with the other branches difficult. The master branch corresponded to the svn trunk. I renamed it to svntrunk. Since I intend to start new work from the 1.4 trunk, I made a new master from that. I set up git at github.com:buildout/buildout.git as the origin remote and pushed to it with -u and --all. Everything seems to be there. :) Maybe someone can check my handiwork. I'm going to go outside and punch some holes in the ground. :) Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton From leorochael at gmail.com Sun Apr 1 21:33:14 2012 From: leorochael at gmail.com (Leonardo Rochael Almeida) Date: Sun, 1 Apr 2012 21:33:14 +0200 Subject: [Distutils] Buildout: adding a link to a compiled library: uno In-Reply-To: <20120401084754.GC25740@ubuntu> References: <20120401084754.GC25740@ubuntu> Message-ID: Hi Alessandro, If you are going to use the Python that comes with your distribution (usually referred to as 'System Python'), and that you want to use the "uno" library that comes with this System Python, that is, you can do something like: $ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import uno >>> print uno.__file__ /usr/lib/python2.6/dist-packages/uno.pyc >>> Then, what you probably need is to use a part with a z3c.recipe.scripts recipe, configuring it like described at [1], to give you access to the system-installed uno library. [1] http://pypi.python.org/pypi/z3c.recipe.scripts#including-site-packages-and-sitecustomize Regards, Leo On Sun, Apr 1, 2012 at 10:47, Alessandro Dentella wrote: > Hi, > > I have many web projects that depend on 'uno' component of openoffice to > prepare pdf. I don't really need to compile it inside my buildout env. I'm > not really inclined to do that as I know dev and deply is always in an > environment with a working system 'uno' package. > > Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to > the site-packages directory. > > Which is the best way to accomplish a simple setup as this one under > buildout? > > thanks in advance > > sandro > *:-) > > > -- > Sandro Dentella ?*:-) > http://www.reteisi.org ? ? ? ? ? ? Soluzioni libere per le scuole > http://sqlkit.argolinux.org ? ? ? ?SQLkit home page - PyGTK/python/sqlalchemy > > > > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig From jon at multani.info Mon Apr 2 04:25:47 2012 From: jon at multani.info (Jonathan Ballet) Date: Mon, 2 Apr 2012 09:25:47 +0700 Subject: [Distutils] [buildout] branches languishing? (site-packages and distutils scripts) In-Reply-To: References: <1099b90b1001190406u52ba46fbs284e1a2a54489de2@mail.gmail.com> <1099b90b1001190816l6af94f67h9074435418034951@mail.gmail.com> <871uohpybv.fsf@transitory.lefae.org> Message-ID: <20120402022545.GA9941@localhost> Hi Jim, On Sun, Apr 01, 2012 at 03:30:06PM -0400, Jim Fulton wrote: > On Sun, Mar 25, 2012 at 5:49 PM, Hanno Schlichting wrote: > > On Sun, Mar 25, 2012 at 11:31 PM, Jim Fulton wrote: > >> Hanno suggested creating a buildout organization. ??I'm up with that. > >> Maybe someone can create one and include me. :) > > > > In case you want it, there you go: https://github.com/buildout/buildout [...] > Maybe someone can check my handiwork. Thanks for the import, this is really cool! You might want to also push the tags to Github. Git doesn't push the tags by default, so you also need to specify "--tags" to your "git push" command. Jonathan From jim at zope.com Mon Apr 2 19:21:49 2012 From: jim at zope.com (Jim Fulton) Date: Mon, 2 Apr 2012 13:21:49 -0400 Subject: [Distutils] [buildout] branches languishing? (site-packages and distutils scripts) In-Reply-To: <20120402022545.GA9941@localhost> References: <1099b90b1001190406u52ba46fbs284e1a2a54489de2@mail.gmail.com> <1099b90b1001190816l6af94f67h9074435418034951@mail.gmail.com> <871uohpybv.fsf@transitory.lefae.org> <20120402022545.GA9941@localhost> Message-ID: On Sun, Apr 1, 2012 at 10:25 PM, Jonathan Ballet wrote: > Hi Jim, > > On Sun, Apr 01, 2012 at 03:30:06PM -0400, Jim Fulton wrote: >> On Sun, Mar 25, 2012 at 5:49 PM, Hanno Schlichting wrote: >> > On Sun, Mar 25, 2012 at 11:31 PM, Jim Fulton wrote: >> >> Hanno suggested creating a buildout organization. ?I'm up with that. >> >> Maybe someone can create one and include me. :) >> > >> > In case you want it, there you go: https://github.com/buildout/buildout > [...] >> Maybe someone can check my handiwork. > > Thanks for the import, this is really cool! > > You might want to also push the tags to Github. Git doesn't push the > tags by default, so you also need to specify "--tags" to your "git push" > command. Thanks. Done. I guess --all means --some. Sigh. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton From chris.jerdonek at gmail.com Mon Apr 2 20:50:31 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Mon, 2 Apr 2012 11:50:31 -0700 Subject: [Distutils] using pip to install an specific, older version Message-ID: Hi, I'm trying to use pip to install an older, specific version of a package in PyPI (specifically simplejson v2.0.9): http://pypi.python.org/pypi/simplejson/2.0.9 I've tried a few variations of the syntax below, but it always seems to install the newest version (v2.5.0). I don't know if this is an issue with simplejson, how I'm using pip, or something else. Based on the below, can anyone say why it's not working and how to correct the behavior? Thanks, --Chris > sudo pip freeze -E /opt/local/bin/python nose==1.1.2 > sudo pip install -E /opt/local/bin/python 'simplejson<2.1.0' Downloading/unpacking simplejson<2.1.0 Running setup.py egg_info for package simplejson Installing collected packages: simplejson Running setup.py install for simplejson File "/opt/local/lib/python2.4/site-packages/simplejson/encoder.py", line 398 if (not _bigint_as_string or ^ SyntaxError: invalid syntax Successfully installed simplejson Cleaning up... > sudo pip freeze -E /opt/local/bin/python nose==1.1.2 simplejson==2.5.0 > python -V Python 2.4.6 > which python /opt/local/bin/python > which pip /usr/local/bin/pip From carl at oddbird.net Mon Apr 2 21:08:30 2012 From: carl at oddbird.net (Carl Meyer) Date: Mon, 02 Apr 2012 13:08:30 -0600 Subject: [Distutils] using pip to install an specific, older version In-Reply-To: References: Message-ID: <4F79F92E.6080604@oddbird.net> Hi Chris, On 04/02/2012 12:50 PM, Chris Jerdonek wrote: > Hi, I'm trying to use pip to install an older, specific version of a > package in PyPI (specifically simplejson v2.0.9): > > http://pypi.python.org/pypi/simplejson/2.0.9 > > I've tried a few variations of the syntax below, but it always seems > to install the newest version (v2.5.0). I don't know if this is an > issue with simplejson, how I'm using pip, or something else. Based on > the below, can anyone say why it's not working and how to correct the > behavior? > > Thanks, > --Chris > > >> sudo pip freeze -E /opt/local/bin/python > nose==1.1.2 >> sudo pip install -E /opt/local/bin/python 'simplejson<2.1.0' > Downloading/unpacking simplejson<2.1.0 > Running setup.py egg_info for package simplejson > Installing collected packages: simplejson > Running setup.py install for simplejson > File "/opt/local/lib/python2.4/site-packages/simplejson/encoder.py", > line 398 > if (not _bigint_as_string or > ^ > SyntaxError: invalid syntax > Successfully installed simplejson > Cleaning up... >> sudo pip freeze -E /opt/local/bin/python > nose==1.1.2 > simplejson==2.5.0 >> python -V > Python 2.4.6 >> which python > /opt/local/bin/python >> which pip > /usr/local/bin/pip I can't replicate this; when I "pip install 'simplejson<2.1.0'" I get 2.0.9. The most likely cause is if you have a build/ directory in your current working dir with an already-unpacked simplejson 2.5.0 in it; there's a known bug in pip that causes it to not check the version if it finds an already-unpacked source. Also, you may want to be aware that the -E flag is deprecated and is already removed in the latest pip release (1.1) because it does not handle isolated virtualenvs correctly. Instead, create a virtualenv and use the pip that is automatically installed inside it (virtualenv path/to/venv && path/to/venv/bin/pip install simplejson). Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From robhealey1 at gmail.com Tue Apr 3 01:17:48 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Mon, 2 Apr 2012 16:17:48 -0700 Subject: [Distutils] python file naming... Message-ID: Greetings: I have python files in my svn repository that I am trying to write my setup.py file for, but I am having problems with. Could someone help me please? I have a file like: /home/Frog/geps0042/gramps/plugins/records.gpr.py, and my setup file errors with: /home/Frog/geps0042/gramps/plugins/records/gpr error: directory does not exist! Would you be able to help me with it??? It is a plugin registration file so it must remain as it is... -- Sincerely yours, Rob G. Healey -------------- next part -------------- An HTML attachment was scrubbed... URL: From merwok at netwok.org Tue Apr 3 01:26:33 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Mon, 02 Apr 2012 19:26:33 -0400 Subject: [Distutils] python file naming... In-Reply-To: References: Message-ID: <4F7A35A9.3050907@netwok.org> Hi, Please include the relevant parts of your setup.py file (py_modules, packages, package_dir, use of setuptools or not). Cheers From kurtschwehr at yahoo.com Tue Apr 3 01:34:58 2012 From: kurtschwehr at yahoo.com (Kurt Schwehr) Date: Mon, 2 Apr 2012 16:34:58 -0700 Subject: [Distutils] python file naming... In-Reply-To: References: Message-ID: Rob, No dots (".") allowed in filenames. Perhaps you can rename to records_gpr.py? -kurt On Apr 2, 2012, at 4:17 PM, Rob Healey wrote: > Greetings: > > I have python files in my svn repository that I am trying to write my setup.py file for, but I am having problems with. Could someone help me please? > > I have a file like: > /home/Frog/geps0042/gramps/plugins/records.gpr.py, and my setup file errors with: > > /home/Frog/geps0042/gramps/plugins/records/gpr > error: directory does not exist! Would you be able to help me with it??? > > It is a plugin registration file so it must remain as it is... > > -- > Sincerely yours, > Rob G. Healey > > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinout at vanrees.org Tue Apr 3 01:54:44 2012 From: reinout at vanrees.org (Reinout van Rees) Date: Tue, 03 Apr 2012 01:54:44 +0200 Subject: [Distutils] [buildout] branches languishing? (site-packages and distutils scripts) In-Reply-To: References: <4B55864E.3080108@simplistix.co.uk> <1099b90b1001190406u52ba46fbs284e1a2a54489de2@mail.gmail.com> <1099b90b1001190816l6af94f67h9074435418034951@mail.gmail.com> <871uohpybv.fsf@transitory.lefae.org> Message-ID: On 01-04-12 21:30, Jim Fulton wrote: > I'm going to go outside and punch some holes in the ground.:) Placing a trebuchet outside of github's headquarters and lobbing 2-century-old eggs at them is reported to be therapeutic, too. Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout at vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" From reinout at vanrees.org Tue Apr 3 01:59:14 2012 From: reinout at vanrees.org (Reinout van Rees) Date: Tue, 03 Apr 2012 01:59:14 +0200 Subject: [Distutils] Buildout: adding a link to a compiled library: uno In-Reply-To: <20120401084754.GC25740@ubuntu> References: <20120401084754.GC25740@ubuntu> Message-ID: On 01-04-12 10:47, Alessandro Dentella wrote: > I have many web projects that depend on 'uno' component of openoffice to > prepare pdf. I don't really need to compile it inside my buildout env. I'm > not really inclined to do that as I know dev and deply is always in an > environment with a working system 'uno' package. > > Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to > the site-packages directory. > > Which is the best way to accomplish a simple setup as this one under > buildout? The easiest way, at least that I have seen, is to use osc.recipe.sysegg: http://pypi.python.org/pypi/osc.recipe.sysegg But you'll need to use buildout version 1.4.4 with this (and thus a special 1.4.4 using bootstrap) to get it to work as the latest buildout (1.5) broke the osc.recipe.sysegg recipe. (1.5 is supposed to work with existing system-level eggs, but I couldn't get it to work reliably in my kind of setup). Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout at vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" From chris.jerdonek at gmail.com Tue Apr 3 03:25:46 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Mon, 2 Apr 2012 18:25:46 -0700 Subject: [Distutils] using pip to install an specific, older version In-Reply-To: <4F79F92E.6080604@oddbird.net> References: <4F79F92E.6080604@oddbird.net> Message-ID: On Mon, Apr 2, 2012 at 12:08 PM, Carl Meyer wrote: > Hi Chris, > > On 04/02/2012 12:50 PM, Chris Jerdonek wrote: >> Hi, I'm trying to use pip to install an older, specific version of a >> package in PyPI (specifically simplejson v2.0.9): >> >> http://pypi.python.org/pypi/simplejson/2.0.9 >> >> I've tried a few variations of the syntax below, but it always seems >> to install the newest version (v2.5.0). ?I don't know if this is an >> issue with simplejson, how I'm using pip, or something else. ?Based on >> the below, can anyone say why it's not working and how to correct the >> behavior? >> >> Thanks, >> --Chris >> >> >>> sudo pip freeze -E /opt/local/bin/python >> nose==1.1.2 >>> sudo pip install -E /opt/local/bin/python 'simplejson<2.1.0' >> Downloading/unpacking simplejson<2.1.0 >> ? Running setup.py egg_info for package simplejson >> Installing collected packages: simplejson >> ? Running setup.py install for simplejson >> ? ? ? File "/opt/local/lib/python2.4/site-packages/simplejson/encoder.py", >> line 398 >> ? ? ? ? if (not _bigint_as_string or >> ? ? ? ? ?^ >> ? ? SyntaxError: invalid syntax >> Successfully installed simplejson >> Cleaning up... >>> sudo pip freeze -E /opt/local/bin/python >> nose==1.1.2 >> simplejson==2.5.0 >>> python -V >> Python 2.4.6 >>> which python >> /opt/local/bin/python >>> which pip >> /usr/local/bin/pip > > I can't replicate this; when I "pip install 'simplejson<2.1.0'" I get > 2.0.9. The most likely cause is if you have a build/ directory in your > current working dir with an already-unpacked simplejson 2.5.0 in it; > there's a known bug in pip that causes it to not check the version if it > finds an already-unpacked source. Thanks, Carl. Good intuition! That was the case for me. Thanks also for the information regarding -E and virtualenv. I will start using that approach. --Chris > > Also, you may want to be aware that the -E flag is deprecated and is > already removed in the latest pip release (1.1) because it does not > handle isolated virtualenvs correctly. Instead, create a virtualenv and > use the pip that is automatically installed inside it (virtualenv > path/to/venv && path/to/venv/bin/pip install simplejson). > > Carl > > > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig > From kevinkunzmann at gmx.net Tue Apr 3 08:09:36 2012 From: kevinkunzmann at gmx.net (Kevin Kunzmann) Date: Tue, 03 Apr 2012 08:09:36 +0200 Subject: [Distutils] Distutils on windows with mingw, messed up includes? Message-ID: <4F7A9420.70304@gmx.net> Hi, I am trying to wrap some c++ library using distutils and swig. So I started with some simple example files and got a faculty function wrapped and runing in ipython. When doing the same with this one: here is the .cpp: #include "jcnError.h" jcnError::jcnError(const string& message, const ErrorType& errorType) : std::runtime_error(message), mErrorMessage(message), mErrorType(errorType) { } const char* jcnError::what(void) const throw() { return std::runtime_error::what(); } jcnError::~jcnError(void) throw() { } here is the header: #pragma once #include #include #include using namespace std; #define jcn_DEBUG /**< If this is defined more error messages will be thrown */ /** * Internal type of error */ enum ErrorType { WARNING, EXCEPTION, }; /** * @class jcnError * @author Jan C. Neddermeyer * @brief jcnError is inherited from the std error class runtime_error */ class jcnError : public runtime_error { public: /** * Constructor * @param message error message, should provide detailed information where and why an error has been thrown * @param errorType optional error type */ jcnError(const string& message, const ErrorType& errorType = EXCEPTION); /** * @return error message, corresponds to the what() method in runtime_error */ virtual const char* what(void) const throw(); /** * @return error message as std::string */ inline const string GetMessage(void) const {return mErrorMessage;}; /** * @return error type */ inline const ErrorType GetErrorType(void) const {return mErrorType;}; /** * Destructor */ ~jcnError(void) throw(); private: string mErrorMessage; /**< error message */ ErrorType mErrorType; /**< error type */ }; here the bpe.i: %module bpetest %{ #include "jcnError.h" %} and finally the setup.py: import distutils from distutils.core import setup, Extension module=Extension('_bpetest',sources=['bpe.i','jcnError.cpp'],include_dirs=['C:/users/kevin/Desktop/bpe_demo/src']) setup(name="bpetest", version="3.2", ext_modules=[module]) I get an error "iostream: No such file or directory". What's the problem? Does distutils get confused by all the virtuals? The error is raised on the very first include line of the headerfile "#include " . Thanks, Kevin From ottomaddox at fastmail.fm Tue Apr 3 17:35:17 2012 From: ottomaddox at fastmail.fm (Otto Maddox) Date: Tue, 03 Apr 2012 16:35:17 +0100 Subject: [Distutils] Installing subpackages under common superpackage Message-ID: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> Hi, I have a Python project which follows a client-server architecture. It is natural to develop it as two different projects and in two different source distributions, myproject-server.tar.gz and myproject-client.tar.gz. Neither package depends on the other, but because they are part of a larger, overarching project, I want install each of them so that they appear as subpackages (myproject.server and myproject.client) under a common superpackage (myproject). I am looking for the cleanest and most correct way to do this using distutils and setup.py, so that I can end up with a structure like this: site-packages/myproject site-packages/myproject/__init__.py site-packages/myproject/server/__init__.py site-packages/myproject/server/file1.py site-packages/myproject/server/file2.py site-packages/myproject/client/__init__.py site-packages/myproject/client/file3.py site-packages/myproject/client/file4.py and so that any of the following commands (and their standard variations) work: import myproject import myproject.server import myproject.client Is there a way to write distutils/setup.py to do this? I have tried something like packages = ["myproject", "myproject.client"] in the client's setup.py and packages = ["myproject", "myproject.server"] in the server's setup.py. This kind of works, but it feels wrong because the second package which gets installed will overwrite files from the first -- for example, there is no clean way to install myproject/__init__.py. I can't imagine that I'm the first person to want to address this use case. What would be the best way of doing this? Finally, does anybody have any examples of other projects which do a similar thing? Thanks. -- http://www.fastmail.fm - Email service worth paying for. Try it for free From robhealey1 at gmail.com Tue Apr 3 17:53:11 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 3 Apr 2012 08:53:11 -0700 Subject: [Distutils] Installing subpackages under common superpackage In-Reply-To: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> References: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> Message-ID: Dear Otto: The only way that I could tell you about a project that kind of does what you are looking for is already done somewhat in Distutils2-1.0a4 tarball... You may get the tarball from here, and look at its setup.py and setup.cfg files... http://pypi.python.org/pypi/Distutils2 Sincerely yours, Rob G. Healey On Tue, Apr 3, 2012 at 8:35 AM, Otto Maddox wrote: > Hi, > > I have a Python project which follows a client-server architecture. It > is natural to develop it as two different projects and in two different > source distributions, myproject-server.tar.gz and > myproject-client.tar.gz. > > Neither package depends on the other, but because they are part of a > larger, overarching project, I want install each of them so that they > appear as subpackages (myproject.server and myproject.client) under a > common superpackage (myproject). I am looking for the cleanest and most > correct way to do this using distutils and setup.py, so that I can end > up with a structure like this: > > site-packages/myproject > site-packages/myproject/__init__.py > > site-packages/myproject/server/__init__.py > site-packages/myproject/server/file1.py > site-packages/myproject/server/file2.py > > site-packages/myproject/client/__init__.py > site-packages/myproject/client/file3.py > site-packages/myproject/client/file4.py > > and so that any of the following commands (and their standard > variations) work: > > import myproject > import myproject.server > import myproject.client > > Is there a way to write distutils/setup.py to do this? > > I have tried something like packages = ["myproject", "myproject.client"] > in the client's setup.py and packages = ["myproject", > "myproject.server"] in the server's setup.py. This kind of works, but it > feels wrong because the second package which gets installed will > overwrite files from the first -- for example, there is no clean way to > install myproject/__init__.py. > > I can't imagine that I'm the first person to want to address this use > case. What would be the best way of doing this? > > Finally, does anybody have any examples of other projects which do a > similar thing? Thanks. > > -- > http://www.fastmail.fm - Email service worth paying for. Try it for free > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig > -- Sincerely yours, Rob G. Healey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon at multani.info Tue Apr 3 18:41:21 2012 From: jon at multani.info (Jonathan Ballet) Date: Tue, 3 Apr 2012 23:41:21 +0700 Subject: [Distutils] Installing subpackages under common superpackage In-Reply-To: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> References: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> Message-ID: <20120403164118.GA3052@localhost> On Tue, Apr 03, 2012 at 04:35:17PM +0100, Otto Maddox wrote: > Hi, > > I have a Python project which follows a client-server architecture. It > is natural to develop it as two different projects and in two different > source distributions, myproject-server.tar.gz and > myproject-client.tar.gz. > > Neither package depends on the other, but because they are part of a > larger, overarching project, I want install each of them so that they > appear as subpackages (myproject.server and myproject.client) under a > common superpackage (myproject). I am looking for the cleanest and most > correct way to do this using distutils and setup.py, so that I can end > up with a structure like this: > > site-packages/myproject > site-packages/myproject/__init__.py > > site-packages/myproject/server/__init__.py > site-packages/myproject/server/file1.py > site-packages/myproject/server/file2.py > > site-packages/myproject/client/__init__.py > site-packages/myproject/client/file3.py > site-packages/myproject/client/file4.py > > and so that any of the following commands (and their standard > variations) work: > > import myproject > import myproject.server > import myproject.client > > Is there a way to write distutils/setup.py to do this? You would probably interested about setuptools' namespace support for doing this, you can have a look at http://packages.python.org/distribute/setuptools.html#namespace-packages Additionnaly, if you are looking for examples, the Zope community is well known for the use of namespaced packages - have a look at the zope., zc., z3c., collective., plone., etc. namespaces. Jonathan From erik.m.bray at gmail.com Tue Apr 3 22:24:54 2012 From: erik.m.bray at gmail.com (Erik Bray) Date: Tue, 3 Apr 2012 16:24:54 -0400 Subject: [Distutils] Strange warnings from package_index? Message-ID: Hello, A user of one of my packages came to me the other day with a strange problem that I've never seen before, and have thus far been unable to reproduce. I was wondering if anyone here had any idea about it. When he runs setup.py build on my package, it immediately outputs: $ python setup.py build Not found: /institute/software_hardware/pyraf/favicon.ico Not found: /resources/styles/style.css Not found: /resources/styles/IEstyle.css Not found: /resources/styles/print.css Not found: /resources/styles/mobile.css Not found: /institute/software_hardware/pyraf/localStyle.css Not found: /institute/software_hardware/pyraf/software_hardware Not found: /institute/employment Not found: /jwst Not found: /institute/newsletter Not found: /institute/annual-reports Not found: /institute/atlast Not found: /institute/sd Not found: /institute/Copyright Not found: /institute/help.html ... Followed by the normal build output, which proceeds without any other problems. All those paths are paths on my company's website. This package has a setup_requires dependency which in turn contains dependency_links=['http://stsdas.stsci.edu/download/packages'] in its setup.py, where http://stsda.stsci.edu/download/packages is a local package repository we have for some of our dependencies. It looks like what's happening is that the PackageIndex is finding links on the site *above* the root of the package index, and then searching for local files with the same path? As I understand the PackageIndex code shouldn't follow links that go above the root of the package index site. So I don't know why it's doing this, and can't reproduce the behavior. For what it's worth, the user has distribute installed (though I'm waiting to find out what version), and is using Python 3.2. Any ideas? Thanks, Erik From me at rpatterson.net Wed Apr 4 03:38:51 2012 From: me at rpatterson.net (Ross Patterson) Date: Tue, 03 Apr 2012 18:38:51 -0700 Subject: [Distutils] Buildout: adding a link to a compiled library: uno References: <20120401084754.GC25740@ubuntu> Message-ID: <87obr8l1hw.fsf@transitory.lefae.org> Reinout van Rees writes: > On 01-04-12 10:47, Alessandro Dentella wrote: >> I have many web projects that depend on 'uno' component of openoffice to >> prepare pdf. I don't really need to compile it inside my buildout env. I'm >> not really inclined to do that as I know dev and deply is always in an >> environment with a working system 'uno' package. >> >> Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to >> the site-packages directory. >> >> Which is the best way to accomplish a simple setup as this one under >> buildout? > > The easiest way, at least that I have seen, is to use osc.recipe.sysegg: > > http://pypi.python.org/pypi/osc.recipe.sysegg > > > But you'll need to use buildout version 1.4.4 with this (and thus a > special 1.4.4 using bootstrap) to get it to work as the latest > buildout (1.5) broke the osc.recipe.sysegg recipe. > > (1.5 is supposed to work with existing system-level eggs, but I > couldn't get it to work reliably in my kind of setup). Have you seen those problems with the 1.5.2 release? Ross From reinout at vanrees.org Wed Apr 4 12:18:29 2012 From: reinout at vanrees.org (Reinout van Rees) Date: Wed, 04 Apr 2012 12:18:29 +0200 Subject: [Distutils] Buildout: adding a link to a compiled library: uno In-Reply-To: <87obr8l1hw.fsf@transitory.lefae.org> References: <20120401084754.GC25740@ubuntu> <87obr8l1hw.fsf@transitory.lefae.org> Message-ID: On 04-04-12 03:38, Ross Patterson wrote: >> (1.5 is supposed to work with existing system-level eggs, but I >> > couldn't get it to work reliably in my kind of setup). > Have you seen those problems with the 1.5.2 release? Yes. iirc the most basic problem was that you HAVE to pin the version, otherwise the system egg isn't used. Which of course doesn't work as the version on my OSX laptop is bound to be a bit different from that on a colleague's ubuntu. And I thought ubuntu's site.py mangling didn't get recognized by 1.5.2, but that might have been the above problem. Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout at vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" From sandro at e-den.it Wed Apr 4 12:58:25 2012 From: sandro at e-den.it (Alessandro Dentella) Date: Wed, 4 Apr 2012 12:58:25 +0200 Subject: [Distutils] Buildout: adding a link to a compiled library: uno In-Reply-To: References: <20120401084754.GC25740@ubuntu> Message-ID: <20120404105824.GA11713@ubuntu> On Tue, Apr 03, 2012 at 01:59:14AM +0200, Reinout van Rees wrote: > On 01-04-12 10:47, Alessandro Dentella wrote: > >I have many web projects that depend on 'uno' component of openoffice to > >prepare pdf. I don't really need to compile it inside my buildout env. I'm > >not really inclined to do that as I know dev and deply is always in an > >environment with a working system 'uno' package. > > > >Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to > >the site-packages directory. > > > >Which is the best way to accomplish a simple setup as this one under > >buildout? > > The easiest way, at least that I have seen, is to use osc.recipe.sysegg: > > http://pypi.python.org/pypi/osc.recipe.sysegg > > > But you'll need to use buildout version 1.4.4 with this (and thus a > special 1.4.4 using bootstrap) to get it to work as the latest > buildout (1.5) broke the osc.recipe.sysegg recipe. > > (1.5 is supposed to work with existing system-level eggs, but I > couldn't get it to work reliably in my kind of setup). Since I also wanted to isolate my environment I started using tl.buildout_virtual_python that offers a siple extra-path variable that accomplishes to my request in a simple way. thanks sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy From ottomaddox at fastmail.fm Wed Apr 4 13:08:51 2012 From: ottomaddox at fastmail.fm (Otto Maddox) Date: Wed, 04 Apr 2012 12:08:51 +0100 Subject: [Distutils] Installing subpackages under common superpackage In-Reply-To: References: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> Message-ID: <1333537731.21977.140661058184529.066D8037@webmail.messagingengine.com> Hi Rob, Thank you for your answer. Could you please point me to the specific functionality/documentation which I need to look at? Andrew On Tue, Apr 3, 2012, at 08:53 AM, Rob Healey wrote: Dear Otto: The only way that I could tell you about a project that kind of does what you are looking for is already done somewhat in Distutils2-1.0a4 tarball... You may get the tarball from here, and look at its setup.py and setup.cfg files... [1]http://pypi.python.org/pypi/Distutils2 Sincerely yours, Rob G. Healey On Tue, Apr 3, 2012 at 8:35 AM, Otto Maddox <[2]ottomaddox at fastmail.fm> wrote: Hi, I have a Python project which follows a client-server architecture. It is natural to develop it as two different projects and in two different source distributions, myproject-server.tar.gz and myproject-client.tar.gz. Neither package depends on the other, but because they are part of a larger, overarching project, I want install each of them so that they appear as subpackages (myproject.server and myproject.client) under a common superpackage (myproject). I am looking for the cleanest and most correct way to do this using distutils and setup.py, so that I can end up with a structure like this: site-packages/myproject site-packages/myproject/__init__.py site-packages/myproject/server/__init__.py site-packages/myproject/server/file1.py site-packages/myproject/server/file2.py site-packages/myproject/client/__init__.py site-packages/myproject/client/file3.py site-packages/myproject/client/file4.py and so that any of the following commands (and their standard variations) work: import myproject import myproject.server import myproject.client Is there a way to write distutils/setup.py to do this? I have tried something like packages = ["myproject", "myproject.client"] in the client's setup.py and packages = ["myproject", "myproject.server"] in the server's setup.py. This kind of works, but it feels wrong because the second package which gets installed will overwrite files from the first -- for example, there is no clean way to install myproject/__init__.py. I can't imagine that I'm the first person to want to address this use case. What would be the best way of doing this? Finally, does anybody have any examples of other projects which do a similar thing? Thanks. -- [3]http://www.fastmail.fm - Email service worth paying for. Try it for free _______________________________________________ Distutils-SIG maillist - [4]Distutils-SIG at python.org [5]http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey References 1. http://pypi.python.org/pypi/Distutils2 2. mailto:ottomaddox at fastmail.fm 3. http://www.fastmail.fm/ 4. mailto:Distutils-SIG at python.org 5. http://mail.python.org/mailman/listinfo/distutils-sig -- http://www.fastmail.fm - Does exactly what it says on the tin -------------- next part -------------- An HTML attachment was scrubbed... URL: From ottomaddox at fastmail.fm Wed Apr 4 13:13:13 2012 From: ottomaddox at fastmail.fm (Otto Maddox) Date: Wed, 04 Apr 2012 12:13:13 +0100 Subject: [Distutils] Installing subpackages under common superpackage In-Reply-To: <20120403164118.GA3052@localhost> References: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> <20120403164118.GA3052@localhost> Message-ID: <1333537993.22842.140661058184781.6A67D630@webmail.messagingengine.com> On Tue, Apr 3, 2012, at 11:41 PM, Jonathan Ballet wrote: > On Tue, Apr 03, 2012 at 04:35:17PM +0100, Otto Maddox wrote: > > I have a Python project which follows a client-server architecture. It > > is natural to develop it as two different projects and in two different > > source distributions, myproject-server.tar.gz and > > myproject-client.tar.gz. > > > > Neither package depends on the other, but because they are part of a > > larger, overarching project, I want install each of them so that they > > appear as subpackages (myproject.server and myproject.client) under a > > common superpackage (myproject). I am looking for the cleanest and most > > correct way to do this using distutils and setup.py, so that I can end > > up with a structure like this: [snip] > You would probably interested about setuptools' namespace support for > doing this, you can have a look at > http://packages.python.org/distribute/setuptools.html#namespace-packages That looks like it might be do the trick. I will evaluate this sort of solution, and compare it with Rob's suggestion to use distutils2. > Additionnaly, if you are looking for examples, the Zope community is > well known for the use of namespaced packages - have a look at the > zope., zc., z3c., collective., plone., etc. namespaces. Thank you. -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow From chris.jerdonek at gmail.com Wed Apr 4 22:10:24 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Wed, 4 Apr 2012 13:10:24 -0700 Subject: [Distutils] using pip to install an specific, older version In-Reply-To: <4F79F92E.6080604@oddbird.net> References: <4F79F92E.6080604@oddbird.net> Message-ID: Hi Carl (or others), On Mon, Apr 2, 2012 at 12:08 PM, Carl Meyer wrote: > > Also, you may want to be aware that the -E flag is deprecated and is > already removed in the latest pip release (1.1) because it does not > handle isolated virtualenvs correctly. Instead, create a virtualenv and > use the pip that is automatically installed inside it (virtualenv > path/to/venv && path/to/venv/bin/pip install simplejson). With regard to the above, if the recommended way to use pip is to use it after calling virtualenv, then what is the recommended way to invoke/install virtualenv for use from a global Python (e.g. from a Python 3.2 installed via MacPorts). Before, I would have installed virtualenv by invoking pip with the -E flag. But by the above that approach is deprecated. Also, does it matter whether virtualenv is run from Python 2 or Python 3? In particular, can virtualenv run from both Python 2.x and Python 3.x create virtual environments based on both Python 2.x and Python 3.x? Thanks, --Chris From carl at oddbird.net Wed Apr 4 22:13:19 2012 From: carl at oddbird.net (Carl Meyer) Date: Wed, 04 Apr 2012 14:13:19 -0600 Subject: [Distutils] using pip to install an specific, older version In-Reply-To: References: <4F79F92E.6080604@oddbird.net> Message-ID: <4F7CAB5F.2060307@oddbird.net> Hi Chris, On 04/04/2012 02:10 PM, Chris Jerdonek wrote: > On Mon, Apr 2, 2012 at 12:08 PM, Carl Meyer wrote: >> Also, you may want to be aware that the -E flag is deprecated and is >> already removed in the latest pip release (1.1) because it does not >> handle isolated virtualenvs correctly. Instead, create a virtualenv and >> use the pip that is automatically installed inside it (virtualenv >> path/to/venv && path/to/venv/bin/pip install simplejson). > > With regard to the above, if the recommended way to use pip is to use > it after calling virtualenv, then what is the recommended way to > invoke/install virtualenv for use from a global Python (e.g. from a > Python 3.2 installed via MacPorts). Before, I would have installed > virtualenv by invoking pip with the -E flag. But by the above that > approach is deprecated. You can just "pip install virtualenv" (or easy_install virtualenv) into your Python 3.2 install, which will make the "virtualenv" script available. Or you can just download the virtualenv.py file from GitHub, and run it via "python virtualenv.py" - it runs fine standalone. > Also, does it matter whether virtualenv is run from Python 2 or Python > 3? In particular, can virtualenv run from both Python 2.x and Python > 3.x create virtual environments based on both Python 2.x and Python > 3.x? You can run virtualenv under either 2.x or 3.x, and create virtualenvs for any Python version by using the --python flag to point to the Python binary you want the new virtualenv to use. So you only need one installation/copy of virtualenv on your system. Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From cesar.covarrubias at gmail.com Thu Apr 5 23:40:21 2012 From: cesar.covarrubias at gmail.com (Cesar Covarrubias) Date: Thu, 5 Apr 2012 14:40:21 -0700 Subject: [Distutils] Creating msi of Python 3.2 app with custom attributes Message-ID: Hello, I am working on creating an msi installer from our Python 3.2 application. I would like the installer to allow me to define a default installation path and to create shortcuts to the Start Menu and/or the Desktop. Ideally, we would like to give the user the option to specify if they would like the to install the shortcuts, but this is not required. Default behavior is to install the shortcuts. I have a setup.py that generates the msi with the default path but I can't seem to figure out how to get it to create the shortcuts. Do note that I have looked at http://docs.python.org/distutils/builtdist.html but that doesn't have expanded documentation. Any suggestions or links to documentation would greatly be appreciated. -- Very Respectfully, Cesar Covarrubias -------------- next part -------------- An HTML attachment was scrubbed... URL: From felix.schwarz at oss.schwarz.eu Fri Apr 6 12:04:55 2012 From: felix.schwarz at oss.schwarz.eu (Felix Schwarz) Date: Fri, 06 Apr 2012 12:04:55 +0200 Subject: [Distutils] zc.buildout: KeyError during "buildout init" with distribute 0.6.25 Message-ID: <4F7EBFC7.404@oss.schwarz.eu> Hey, I use Python 2.7 (Fedora 16). However zc.buildout (1.5.2) does not work for me: $ buildout init Creating '/home/fs/temp/buildout.cfg'. Creating directory '/home/fs/temp/bin'. Creating directory '/home/fs/temp/parts'. Creating directory '/home/fs/temp/eggs'. Creating directory '/home/fs/temp/develop-eggs'. Getting distribution for 'distribute'. Traceback (most recent call last): ... add_activation_listener(lambda dist: dist.activate()) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2230, in activate map(declare_namespace, self._get_metadata('namespace_packages.txt')) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1815, in declare_namespace path = sys.modules[parent].__path__ KeyError: 'peak' An error occurred when trying to install distribute 0.6.25. Look above this message for any errors that were output by easy_install. While: Bootstrapping. Getting distribution for 'distribute'. Error: Couldn't install: distribute 0.6.25 The code which causes the exception is: def declare_namespace(packageName): ... if '.' in packageName: parent = '.'.join(packageName.split('.')[:-1]) declare_namespace(parent) if parent not in _namespace_packages: __import__(parent) try: path = sys.modules[parent].__path__ except AttributeError: raise TypeError("Not a package:", parent) The package which triggers the bug is 'decoratortools' (python package 'peak.utils'). If I install other namespace packages (e.g. zope.interface) everything works fine. The error happens because 'peak' is not in sys.modules when buildout calls it's easy_install implementation. If I add some code to ignore the keyerror, everything works as expected though I'm not sure that this is the right fix. Any idea how I can fix this? Pointers welcome. fs From felix.schwarz at oss.schwarz.eu Fri Apr 6 12:45:17 2012 From: felix.schwarz at oss.schwarz.eu (Felix Schwarz) Date: Fri, 06 Apr 2012 12:45:17 +0200 Subject: [Distutils] zc.buildout: KeyError during "buildout init" with distribute 0.6.25 In-Reply-To: <4F7EBFC7.404@oss.schwarz.eu> References: <4F7EBFC7.404@oss.schwarz.eu> Message-ID: <4F7EC93D.3030605@oss.schwarz.eu> Also I should mention that the problem is somehow connected to the way how Fedora installs the decoratortools. If I install 'decoratortools' manually through easy_install (system-wide), the problem does not appear. When I traced the code I found that in the latter case zc.buildout/easy_install does not check for peak.util after it prints Getting distribution for 'distribute' while it checks for peak.util when decoratortools is installed via Fedora's packages. I don't see an obvious difference: Fedora does not do anything special to the source and builds/installs it like that: %{__python} setup.py build %{__python} setup.py install --skip-build --root %{buildroot} Other Fedora namespace packages (e.g. paste, logilab, zope) don't cause issues. What's so special about peak? The only obvious difference I see is that the peak packages install individual Python files (decorators.py, symbols.py) in a common python package "peak.utils" while other libraries seem to prefer separate packages (e.g. zope.interface, zope.proxy). I'm not sure why this seems to make a difference but the complexity Python's/setuptools' site activation mechanism is currently over my head. fs From felix.schwarz at oss.schwarz.eu Sat Apr 7 00:16:35 2012 From: felix.schwarz at oss.schwarz.eu (Felix Schwarz) Date: Sat, 07 Apr 2012 00:16:35 +0200 Subject: [Distutils] zc.buildout: KeyError during "buildout init" with distribute 0.6.25 In-Reply-To: <4F7EC93D.3030605@oss.schwarz.eu> References: <4F7EBFC7.404@oss.schwarz.eu> <4F7EC93D.3030605@oss.schwarz.eu> Message-ID: <4F7F6B43.90205@oss.schwarz.eu> Am 06.04.2012 12:45, schrieb Felix Schwarz: > Also I should mention that the problem is somehow connected to the way how > Fedora installs the decoratortools. > > If I install 'decoratortools' manually through easy_install (system-wide), the > problem does not appear. Actually I understood why that's happening: pkg_resources will activate all namespace packages on sys.path. And Fedora puts the decoratortools in 'site-packages/peak/...' so it is found while easy_install stores the code in 'site-packages/DecoratorTools-1.8-py2.7.egg/'. I think I also know now why peak.utils triggers the problem. Here's the code from pkg_resources.py def declare_namespace(packageName): ... path, parent = sys.path, None if '.' in packageName: parent = '.'.join(packageName.split('.')[:-1]) declare_namespace(parent) if parent not in _namespace_packages: __import__(parent) try: path = sys.modules[parent].__path__ except AttributeError: raise TypeError("Not a package:", parent) All other namespace packages on my system (not many) just used a simple namespace package like 'logilab' or 'paste'. Therefore the extra if '.' in packageName: code path is not executed. And that path expects that the parent is actually loaded in sys.modules which is not valid in zc.buildout (as it manually resets 'sys.path' after loading site.py). Suggestions how the problem can be fixed? I think buildout is currently broken for nested namespace packages directly installed in site-packages. fs From chris.jerdonek at gmail.com Sat Apr 7 04:17:04 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Fri, 6 Apr 2012 19:17:04 -0700 Subject: [Distutils] proper use of use_2to3 with Distribute's test Message-ID: I have a question regarding the proper use of the use_2to3 feature of Distribute's test, as described here: [1] http://packages.python.org/distribute/python3.html#distribute-as-help-during-porting My tests run correctly under Python 2.7 when running the following: python setup.py test However, when I switch to Python 3, I get a syntax error when running this command. The syntax error occurs in a module in a subdirectory of my working directory called "tests". Modules in this directory don't seem to be converted to Python 3 when using the "use_2to3" keyword argument. When I manually convert everything to Python 3 using the following, I am able to run unit tests without that same syntax error: 2to3 --write --nobackups --no-diffs . What is the proper way to tell setup() which files to convert to Python 3? Below is the relevant portion of my call to setup(): setup(name='pystache', ... packages=['pystache'], test_suite = 'tests', ) It might be worth expanding the documentation in the link [1] above with the additional information that an answer to my question will provide. Thanks, --Chris From chris.jerdonek at gmail.com Sat Apr 7 04:24:48 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Fri, 6 Apr 2012 19:24:48 -0700 Subject: [Distutils] proper use of use_2to3 with Distribute's test In-Reply-To: References: Message-ID: On Fri, Apr 6, 2012 at 7:17 PM, Chris Jerdonek wrote: > I have a question regarding the proper use of the use_2to3 feature of > Distribute's test, as described here: > > [1] http://packages.python.org/distribute/python3.html#distribute-as-help-during-porting > > My tests run correctly under Python 2.7 when running the following: > > ? ?python setup.py test > > However, when I switch to Python 3, I get a syntax error when running > this command. ?The syntax error occurs in a module in a subdirectory > of my working directory called "tests". ?Modules in this directory > don't seem to be converted to Python 3 when using the "use_2to3" > keyword argument. > > When I manually convert everything to Python 3 using the following, I > am able to run unit tests without that same syntax error: > > ? ?2to3 --write --nobackups --no-diffs . > > What is the proper way to tell setup() which files to convert to > Python 3? ?Below is the relevant portion of my call to setup(): > > setup(name='pystache', > ? ? ?... > ? ? ?packages=['pystache'], > ? ? ?test_suite = 'tests', > ) Sorry, this should have been the following (i.e. my call does include the use_2to3 keyword)-- setup(name='pystache', ... packages=['pystache'], test_suite ='tests', use_2to3=True, ) Modules in my package's "pystache" directory are copied/converted to a directory called "build/lib/pystache", but not modules in my package's "test" directory. > > It might be worth expanding the documentation in the link [1] above > with the additional information that an answer to my question will > provide. > > Thanks, > --Chris From felix.schwarz at oss.schwarz.eu Sat Apr 7 13:17:10 2012 From: felix.schwarz at oss.schwarz.eu (Felix Schwarz) Date: Sat, 07 Apr 2012 13:17:10 +0200 Subject: [Distutils] zc.buildout: KeyError during "buildout init" with distribute 0.6.25 In-Reply-To: <4F7F6B43.90205@oss.schwarz.eu> References: <4F7EBFC7.404@oss.schwarz.eu> <4F7EC93D.3030605@oss.schwarz.eu> <4F7F6B43.90205@oss.schwarz.eu> Message-ID: <4F802236.3000700@oss.schwarz.eu> Had an idea how to fix this in zc.buildout (see attached patch). Of course it leads to some activated namespaces which should be inactive but as this is mostly relevant for "buildout init" I hope it's anyway acceptable. Comments welcome. fs -------------- next part -------------- A non-text attachment was scrubbed... Name: python-zc-buildout-namespace-packages.patch Type: text/x-patch Size: 1677 bytes Desc: not available URL: From jim at zope.com Sat Apr 7 21:00:51 2012 From: jim at zope.com (Jim Fulton) Date: Sat, 7 Apr 2012 15:00:51 -0400 Subject: [Distutils] Buildout development list Message-ID: So as not to spam people here, I've created a separate list for people working on buildout: https://groups.google.com/forum/?fromgroups#!forum/buildout-development Anyone who want to help with buildout development is welcome. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://www.dublinstore.com/ From jim at zope.com Sat Apr 7 22:24:25 2012 From: jim at zope.com (Jim Fulton) Date: Sat, 7 Apr 2012 16:24:25 -0400 Subject: [Distutils] Can't count on -S to get a clean Python (at least on mac) Message-ID: On my mac (Snow Leopard): $ which python /usr/bin/python $ python -S Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >>> import setuptools >>> setuptools.__file__ '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/__init__.pyc' >>> import os >>> os.listdir('/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python') ['altgraph', 'altgraph-0.6.8.dev-py2.6.egg-info', 'bdist_mpkg', 'bdist_mpkg-0.4.3.dev-py2.6.egg-info', 'bonjour', 'bonjour_py-0.3-py2.6.egg-info', 'CoreGraphics', 'dateutil', 'easy_install.py', 'easy_install.pyc', 'ez_setup', 'fetchmailconf.py', 'fetchmailconf.pyc', 'fetchmailconf.pyo', 'libsvn', 'macholib', 'macholib-1.2.1.dev-py2.6.egg-info', 'modulegraph', 'modulegraph-0.7.2.dev-py2.6.egg-info', 'numpy', 'numpy-1.2.1-py2.6.egg-info', 'OpenSSL', 'pkg_resources.py', 'pkg_resources.pyc', 'py2app', 'py2app-0.4.2-py2.6.egg-info', 'PyObjC', 'PyObjC.pth', 'pyOpenSSL-0.7-py2.6.egg-info', 'PyRSS2Gen-1.0.0-py2.6.egg-info', 'PyRSS2Gen.py', 'PyRSS2Gen.pyc', 'python_dateutil-1.2-py2.6.egg-info', 'setuptools', 'setuptools-0.6c9-py2.6.egg-info', 'site.py', 'site.pyc', 'site.pyo', 'svn', 'twisted', 'Twisted-8.2.0-py2.6.egg-info', 'wx-2.8-mac-unicode', 'wx.pth', 'wxaddons', 'wxaddons-2.8.8.1-py2.6.egg-info', 'wxPython_common-2.8.8.1-py2.6.egg-info', 'wxversion.py', 'wxversion.pyc', 'xattr', 'xattr-0.5-py2.6.egg-info', 'zope', 'zope.interface-3.5.1-py2.6.egg-info'] whimper I get something similar on a Lion machine. I haven't been able to reproduce this lamosity on any linux systems. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://www.dublinstore.com/ From nad at acm.org Sat Apr 7 22:46:07 2012 From: nad at acm.org (Ned Deily) Date: Sat, 07 Apr 2012 13:46:07 -0700 Subject: [Distutils] Can't count on -S to get a clean Python (at least on mac) References: Message-ID: In article , Jim Fulton wrote: > On my mac (Snow Leopard): > > $ which python > /usr/bin/python > > $ python -S > Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin > >>> import setuptools > >>> setuptools.__file__ > '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/se > tuptools/__init__.pyc' > >>> import os > >>> os.listdir('/System/Library/Frameworks/Python.framework/Versions/2.6/Extra > >>> s/lib/python') > ['altgraph', 'altgraph-0.6.8.dev-py2.6.egg-info', 'bdist_mpkg', > 'bdist_mpkg-0.4.3.dev-py2.6.egg-info', 'bonjour', > 'bonjour_py-0.3-py2.6.egg-info', 'CoreGraphics', 'dateutil', > 'easy_install.py', 'easy_install.pyc', 'ez_setup', 'fetchmailconf.py', > 'fetchmailconf.pyc', 'fetchmailconf.pyo', 'libsvn', 'macholib', > 'macholib-1.2.1.dev-py2.6.egg-info', 'modulegraph', > 'modulegraph-0.7.2.dev-py2.6.egg-info', 'numpy', > 'numpy-1.2.1-py2.6.egg-info', 'OpenSSL', 'pkg_resources.py', > 'pkg_resources.pyc', 'py2app', 'py2app-0.4.2-py2.6.egg-info', > 'PyObjC', 'PyObjC.pth', 'pyOpenSSL-0.7-py2.6.egg-info', > 'PyRSS2Gen-1.0.0-py2.6.egg-info', 'PyRSS2Gen.py', 'PyRSS2Gen.pyc', > 'python_dateutil-1.2-py2.6.egg-info', 'setuptools', > 'setuptools-0.6c9-py2.6.egg-info', 'site.py', 'site.pyc', 'site.pyo', > 'svn', 'twisted', 'Twisted-8.2.0-py2.6.egg-info', > 'wx-2.8-mac-unicode', 'wx.pth', 'wxaddons', > 'wxaddons-2.8.8.1-py2.6.egg-info', > 'wxPython_common-2.8.8.1-py2.6.egg-info', 'wxversion.py', > 'wxversion.pyc', 'xattr', 'xattr-0.5-py2.6.egg-info', 'zope', > 'zope.interface-3.5.1-py2.6.egg-info'] > > whimper > > I get something similar on a Lion machine. > > I haven't been able to reproduce this lamosity on any linux systems. Blame it on Apple's modifications to the system Pythons and the setuptools they supply in OS X. The third-party packages they supply with the system Python are not installed in the same directory where user-installed site-packages go, for instance. You won't see this behavior with the Pythons for OS X installed from python.org: $ /usr/local/bin/python2.7 Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import setuptools >>> setuptools.__file__ '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pac kages/distribute-0.6.24-py2.7.egg/setuptools/__init__.pyc' >>> ^D $ /usr/local/bin/python2.7 -S Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >>> import setuptools Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools >>> ^D -- Ned Deily, nad at acm.org From zvezdan at computer.org Sun Apr 8 00:42:41 2012 From: zvezdan at computer.org (Zvezdan Petkovic) Date: Sat, 7 Apr 2012 18:42:41 -0400 Subject: [Distutils] Can't count on -S to get a clean Python (at least on mac) In-Reply-To: References: Message-ID: I know what you mean when you say clean Python. However, for vendors, clean Python is the distribution that supports all their features and does not break their promises. They do not promise Python with no additional extra packages. For example, Apple has the support for the scripting bridge towards Objective-C libraries, py2app builder, and probably some other features that are obviously important to them. On Apr 7, 2012, at 4:24 PM, Jim Fulton wrote: > On my mac (Snow Leopard): > > $ which python > /usr/bin/python > > $ python -S > Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >>>> import setuptools >>>> setuptools.__file__ > '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/__init__.pyc' >>> The only thing this shows is that setuptools are in the Extras and that Extras are obviously always in sys.path. This doesn't mean that site.py was loaded. Do notice that site-packages are not included with python -S: $ python Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> '/Library/Python/2.6/site-packages' in sys.path True >>> '/Users/zvezdan/Library/Python/2.6/site-packages' in sys.path True >>> '/Users/zvezdan/.local/lib/python2.6/site-packages' in sys.path True >>> ^D $ python -S Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >>> import sys >>> '/Library/Python/2.6/site-packages' in sys.path False >>> '/Users/zvezdan//Library/Python/2.6/site-packages' in sys.path False >>> '/Users/zvezdan/.local/lib/python2.6/site-packages' in sys.path False >>> ^D The python2.6 man page says this: -S Disable the import of the module site and the site-dependent manipulations of sys.path that it entails. According to the tests above that promise is fulfilled. Nothing site dependent was loaded. > whimper Your expectations of the -S option might be too high. :-) > I haven't been able to reproduce this lamosity on any linux systems. Probably because they are not trying to support a scripting bridge or an app builder. Perhaps they do, but don't care if it breaks when -S is used. :-) I'm pretty sure I've seen python installations on Linux that had their own warts. I know you are trying to do something with this (probably for buildout) and that not being able to rely on -S is frustrating, to put it mildly. I'm not arguing that, I just tried to point out what I thought was behind this behavior. Regards, Zvezdan From tim at gfxmonk.net Sun Apr 8 13:47:07 2012 From: tim at gfxmonk.net (Tim Cuthbertson) Date: Sun, 8 Apr 2012 21:47:07 +1000 Subject: [Distutils] Creating a new installation layout Message-ID: I'm curious, how would one create a new layout? (as in a --layout=deb alternative). I'd very much like to have a layout that doesn't include any version information in the path, which both "deb" and "unix" do. Ideally, output would look pretty much like: bin/ bin/script1 bin/script2 lib/ lib/some_c_ext.so lib/python/ lib/python/packagename/ lib/python/packagename/__init__.py lib/python/packagename/core.py Something simple, without the unnecessary layers of "usr", "local", "site-packages", "python2.7" etc. The purpose is to be put into a self-contained archive, so it's completely unnecessary to include such namespacing (it will never be mixed in with any other files). Is this possible? not worth it? Right now to achieve at least version independence on the paths I'm running : python setup.py install --root="$DISTDIR" --single-version-externally-managed --install-layout=deb && \ mv "$DISTDIR/usr/lib/"python* "$DISTDIR/usr/lib/python" which is hacky, but works. And you end up with paths like "usr/lib/python/dist-packages" inside the archive, which is just unnecessarily nested for a standalone archive. From jim at zope.com Sun Apr 8 15:23:28 2012 From: jim at zope.com (Jim Fulton) Date: Sun, 8 Apr 2012 09:23:28 -0400 Subject: [Distutils] Can't count on -S to get a clean Python (at least on mac) In-Reply-To: References: Message-ID: On Sat, Apr 7, 2012 at 6:42 PM, Zvezdan Petkovic wrote: > I know what you mean when you say clean Python. > > However, for vendors, clean Python is the distribution that supports all their features and does not break their promises. ??They do not promise Python with no additional extra packages. ??For example, Apple has the support for the scripting bridge towards Objective-C libraries, py2app builder, and probably some other features that are obviously important to them. Yup. In some ways, a vendor-supplied (aka "system") Python is like an application or application platform with lots of specific components that the OS may depend on. > > On Apr 7, 2012, at 4:24 PM, Jim Fulton wrote: > >> On my mac (Snow Leopard): >> >> $ which python >> /usr/bin/python >> >> $ python -S >> Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) >> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >>>>> import setuptools >>>>> setuptools.__file__ >> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/__init__.pyc' >>>> > > > The only thing this shows is that setuptools are in the Extras and that Extras are obviously always in sys.path. Yup. > > This doesn't mean that site.py was loaded. I never said it was. > Do notice that site-packages are not included with python -S: But, as you and I pointed out, Extras is and contains lots of non-standard stuff that you can't avoid using a platform-independent mechanism. ... > > The python2.6 man page says this: > > -S Disable the import of the module site and the site-dependent > manipulations of sys.path that it entails. > > According to the tests above that promise is fulfilled. > Nothing site dependent was loaded. My point was that using -S didn't yield a (even a relatively) clean Python. (Check the subject of this thread.) For years, some people have been confused and annoyed at my assertion that applications shouldn't be built on system Pythons because the results are too unpredictable. At the Python language summit in Atlanta last year, I suggested that it would be useful to define a standard for a baseline Python that applications could depend on. System packagers could provide this alongside their loaded Python installations. At the time, it was suggested that all that was needed was to to use -S to avoid system-supplied custom packages. There was even a change made in 3.3 to make the -S option more reliable by allowing useful utilities previously available in site.py available without importing it. (In most versions of Python, even if -S is used, site.py may get imported by something trying to get at one of these utilities.) Of course, there were other issues like unicode sizes (seemingly addresses by recent unicode enhancements) and other build options, but it was thought that extra libraries were the biggest issue. >> whimper > > Your expectations of the -S option might be too high. :-) My expectations weren't too high, but I suspect other's are. >> I haven't been able to reproduce this lamosity on any linux systems. > > > Probably because they are not trying to support a scripting bridge or an app builder. Perhaps they do, but don't care if it breaks when -S is used. :-) I'm pretty sure I've seen python installations on Linux that had their own warts. I think it's more likely because they used the correct mechanism and add extras to the path in site.py. I would call the Apple packaging a bug. > I know you are trying to do something with this (probably for > buildout) and that not being able to rely on -S is frustrating, to > put it mildly. I'm not arguing that, I just tried to point out what > I thought was behind this behavior. Buildout 1.5 tries hard to leverage -S to provide isolation. The new buildout will as well, although it won't be very effective. The position of the new (simpler and more maintainable buildout) is that buildout will provide facilities for working with system Pythons, but it will make few if any promises and it won't work nearly as hard as zc.buildout 1.5 does. The position will be that if you're building non-trivial applications, you'd better use a clean Python. I still think it would be useful for the Python community/PSF to define a "clean" or baseline Python for applications and work out how such a thing could live alongside a loaded/extra-batteries-included installation. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://www.dublinstore.com/ From chris.jerdonek at gmail.com Mon Apr 9 11:51:35 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Mon, 9 Apr 2012 02:51:35 -0700 Subject: [Distutils] questions re: data files with Distribute's test Message-ID: I have a few questions about including data files when running python setup.py test with Distribute while using Python 3 and the "use_2to3" keyword argument. Some of my test files are in a subdirectory of my project outside of the package directory. I'm able to have the test files copied over to the build directory when running "test" by including a package_data argument something like the following: package_data = {'package': ['../path/to/test/data/*.json']} My questions are-- (1) Is it acceptable to be using parent directories to reference files outside the package directory, or is there a better way to reference paths relative to the project root? Perhaps data_files? (2) Is there an easy way to make it so that these data files get copied only when the test command is being run? The files aren't needed when not developing. (3) Are there any best practices around including/installing test files in distributions (or should they be left out)? Thanks, --Chris From pje at telecommunity.com Tue Apr 10 07:12:14 2012 From: pje at telecommunity.com (PJ Eby) Date: Tue, 10 Apr 2012 01:12:14 -0400 Subject: [Distutils] Fwd: specify manifest template other than MANIFEST.in In-Reply-To: <4F6A8C27.6010908@netwok.org> References: <4F693B52.2020202@netwok.org> <4F6A8C27.6010908@netwok.org> Message-ID: On Mar 21, 2012 10:19 PM, "?ric Araujo" wrote: > From a quick look at the code setuptools? sdist command ignores > MANIFEST.in and MANIFEST altogether and takes the list of files from the > version control system. No, MANIFEST.in is used, it's just that setuptools doesn't depend on the MANIFEST file. Distutils by itself can end up with a stale MANIFEST file, so setuptools ignores it. MANIFEST.in, on the other hand, is used as a supplement to any available revision control info. The main problem the OP will have here is that putting multiple distributions in a single directory isn't well-supported by distutils or any distutils-based build systems that I know of at the moment. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pje at telecommunity.com Tue Apr 10 07:18:07 2012 From: pje at telecommunity.com (PJ Eby) Date: Tue, 10 Apr 2012 01:18:07 -0400 Subject: [Distutils] Creating a new installation layout In-Reply-To: References: Message-ID: On Apr 8, 2012 7:47 AM, "Tim Cuthbertson" wrote: > > I'm curious, how would one create a new layout? (as in a --layout=deb > alternative). I'd very much like to have a layout that doesn't include > any version information in the path, which both "deb" and "unix" do. > Ideally, output would look pretty much like: > > bin/ > bin/script1 > bin/script2 > lib/ > lib/some_c_ext.so > lib/python/ > lib/python/packagename/ > lib/python/packagename/__init__.py > lib/python/packagename/core.py Use "setup.py install --single-version-externally-managed --install-lib=lib/python --install-scripts=bin"; add other options for any other directories as needed. You can configure these options in your .pydistutils.cfg so as to not have to set them every time you create an installation. > Something simple, without the unnecessary layers of "usr", "local", > "site-packages", "python2.7" etc. The purpose is to be put into a > self-contained archive, so it's completely unnecessary to include such > namespacing (it will never be mixed in with any other files). FWIW, you can use bdist_egg to create a similar archive, except that lib/ is replaced by ./ and bin/ is replaced by EGG-INFO/scripts/. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at gfxmonk.net Tue Apr 10 07:35:46 2012 From: tim at gfxmonk.net (Tim Cuthbertson) Date: Tue, 10 Apr 2012 15:35:46 +1000 Subject: [Distutils] Creating a new installation layout In-Reply-To: References: Message-ID: On Tue, Apr 10, 2012 at 3:18 PM, PJ Eby wrote: > > On Apr 8, 2012 7:47 AM, "Tim Cuthbertson" wrote: >> >> I'm curious, how would one create a new layout? (as in a --layout=deb >> alternative). I'd very much like to have a layout that doesn't include >> any version information in the path, which both "deb" and "unix" do. >> Ideally, output would look pretty much like: >> >> bin/ >> bin/script1 >> bin/script2 >> lib/ >> lib/some_c_ext.so >> lib/python/ >> lib/python/packagename/ >> lib/python/packagename/__init__.py >> lib/python/packagename/core.py > > Use "setup.py install --single-version-externally-managed > --install-lib=lib/python --install-scripts=bin"; add other options for any > other directories as needed. Cheers, will look into it. Is there a canonical list of what possible directories, or should I just look at the --help output? Am I going to run into trouble where some projects have different options? For example, calling `python setup.py` could be implemented by distutils, setuptools, distribute, and god knows what else. I would like for the same options to work across all backends, since I'm building a lot of libraries without wanting to care too deeply about which build system they use. Is this doable, or would it potentially have to be crafted to each package? > You can configure these options in your .pydistutils.cfg so as to not have > to set them every time you create an installation. > >> Something simple, without the unnecessary layers of "usr", "local", >> "site-packages", "python2.7" etc. The purpose is to be put into a >> self-contained archive, so it's completely unnecessary to include such >> namespacing (it will never be mixed in with any other files). > > FWIW, you can use bdist_egg to create a similar archive, except that lib/ is > replaced by ./ and bin/ is replaced by EGG-INFO/scripts/. True, although I want a folder, not an archive. I could unpack it, but the less steps in a build script the better. From robhealey1 at gmail.com Wed Apr 11 07:44:44 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 10 Apr 2012 22:44:44 -0700 Subject: [Distutils] Distutils2 Documentation... Message-ID: Greetings: >From this web page, http://packages.python.org/Distutils2/distutils/setupscript.html, #!/usr/bin/env python from distutils2.core import setup, find_packages setup(name='Distutils2', version='1.0', summary='Python Distribution Utilities', keywords=['packaging', 'distutils2'], author=u'Tarek Ziad?', author_email='tarek at ziade.org', home_page='http://bitbucket.org/tarek/distutils2/wiki/Home', license='PSF', packages=find_packages()) Can anyone tell me what I need to do to import setup using Distutils2??? -- Sincerely yours, Rob G. Healey From erik.m.bray at gmail.com Wed Apr 11 19:19:53 2012 From: erik.m.bray at gmail.com (Erik Bray) Date: Wed, 11 Apr 2012 13:19:53 -0400 Subject: [Distutils] Distutils2 Documentation... In-Reply-To: References: Message-ID: On Wed, Apr 11, 2012 at 1:44 AM, Rob Healey wrote: > Greetings: Hi there. > From this web page, > http://packages.python.org/Distutils2/distutils/setupscript.html, > > #!/usr/bin/env python > > from distutils2.core import setup, find_packages > > setup(name='Distutils2', > ? ? ?version='1.0', > ? ? ?summary='Python Distribution Utilities', > ? ? ?keywords=['packaging', 'distutils2'], > ? ? ?author=u'Tarek Ziad?', > ? ? ?author_email='tarek at ziade.org', > ? ? ?home_page='http://bitbucket.org/tarek/distutils2/wiki/Home', > ? ? ?license='PSF', > ? ? ?packages=find_packages()) > > Can anyone tell me what I need to do to import setup using Distutils2??? You don't need or want (or have the ability) to do that. there is no setup() in distutils2. I would refer you to the last time you asked this question: http://mail.python.org/pipermail/distutils-sig/2012-March/018408.html Eric's answer stands: there is no setup.py. Make a setup.cfg. Read the docs on docs.python.org/dev. Erik From pje at telecommunity.com Wed Apr 11 21:00:29 2012 From: pje at telecommunity.com (PJ Eby) Date: Wed, 11 Apr 2012 15:00:29 -0400 Subject: [Distutils] Creating a new installation layout In-Reply-To: References: Message-ID: On Tue, Apr 10, 2012 at 1:35 AM, Tim Cuthbertson wrote: > Cheers, will look into it. Is there a canonical list of what possible > directories, or should I just look at the --help output? > The latter. Am I going to run into trouble where some projects have different > options? For example, calling `python setup.py` could be implemented > by distutils, setuptools, distribute, and god knows what else. I can't speak for "what else", but the first three tools you mention support the same installation directory options for setup.py. (Except distutils itself doesn't recognize --single-version-externally-managed.) True, although I want a folder, not an archive. I could unpack it, but > the less steps in a build script the better. > Well, if you're willing to use setuptools or distribute, you can do "easy_install -mxNZd tempdir projectdir", where projectdir is a directory with a setup.py. After running this command, tempdir will have a single .egg subdirectory added to it, containing a version of the library with a known directory layout. You can then do something like: cd tempdir mv *.egg/EGG-INFO/scripts bin mv *.egg lib To get your desired layout. For bonus points, you can rename the EGG-INFO/ subdirectory to packagename.egg-info/. ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at netwok.org Wed Apr 11 15:35:28 2012 From: eric at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Wed, 11 Apr 2012 09:35:28 -0400 Subject: [Distutils] Distutils2 Documentation... In-Reply-To: References: Message-ID: <4F8588A0.8090805@netwok.org> Hi, The doc on packages.python.org is for distutils2 1.0a3 and is two years old. I need to remove it but haven?t found the time. The current docs live at docs.python.org, but not all of it is updated. To get started in the meantime, please follow the directions I provided in my reply to your previous message on this list: http://mail.python.org/pipermail/distutils-sig/2012-March/018408.html Regards From robhealey1 at gmail.com Wed Apr 11 23:08:29 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Wed, 11 Apr 2012 14:08:29 -0700 Subject: [Distutils] Distutils2 Documentation... In-Reply-To: <4F8588A0.8090805@netwok.org> References: <4F8588A0.8090805@netwok.org> Message-ID: Dear Eric: Thank you for the information once again! I have bad tunnel vision and I am legally blind, so please forgive me... Sincerely yours, Rob G. Healey On Wed, Apr 11, 2012 at 6:35 AM, ?ric Araujo wrote: > Hi, > > The doc on packages.python.org is for distutils2 1.0a3 and is two years old. > ?I need to remove it but haven?t found the time. ?The current docs live at > docs.python.org, but not all of it is updated. > > To get started in the meantime, please follow the directions I provided in > my reply to your previous message on this list: > http://mail.python.org/pipermail/distutils-sig/2012-March/018408.html > > Regards > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey From eric at netwok.org Wed Apr 11 23:45:14 2012 From: eric at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Wed, 11 Apr 2012 17:45:14 -0400 Subject: [Distutils] Distutils2 Documentation... In-Reply-To: References: <4F8588A0.8090805@netwok.org> Message-ID: <4F85FB6A.3060103@netwok.org> Dear Rob, You?re of course excused. If we hadn?t let the docs get out of control we would have less confused users. I?ll do my best to find time. Regards From merwok at netwok.org Thu Apr 12 02:54:20 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Wed, 11 Apr 2012 20:54:20 -0400 Subject: [Distutils] Distutils2 Sprint in Montreal Message-ID: <4F8627BC.2040905@netwok.org> Hi all, The Montreal-Python user group (http://montrealpython.org/) is hosting a sprint on the 21st of April to work on Distutils2. I will lead the sprint and commit the patches into the main distutils2 and cpython repositories, with the help of a few local hackers. If you live in Montreal, bring your laptop and your enthusiasm, we will provide the food and the good times! No previous knowledge of Distutils2 is required, just general Python skills. Distutils2, as many of you know, is the official successor of Distutils. It aims to be a better, more flexible and more featureful packaging tool for Python authors, as well as a collection of reusable modules implementing the PEPs produced by the distutils-sig third-party packaging tools developers. Everybody loves pip and buildout :) With the first beta versions of Distutils2 and Python 3.3 (which includes Distutils2) coming in June, we are planning a series of sprints to make it ready for prime time. During the sprint, the organization team will guide you through the codebase and provide help and review if you need them. Previous sprints held in Montreal have improved Distutils2, and the participants have had fun and learned things, in line with their motto ?For hacks and glory!?. Why don?t you come along for the next one and put your mark on a Python release? The good folks at Radialpoint have graciously provided us with space and free pizza. Come join us on Saturday, the 21st of April, from 12pm to 7pm. The address is: 2050 Bleury Street Suite 300 Map: http://g.co/maps/cuaxc Registration: http://www.eventbrite.ca/event/3261945567 (preferable but not required) Cheers From wichert at wiggy.net Thu Apr 12 12:16:22 2012 From: wichert at wiggy.net (Wichert Akkerman) Date: Thu, 12 Apr 2012 12:16:22 +0200 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? Message-ID: <4F86AB76.1020509@wiggy.net> I am running into something very odd on an Ubuntu 11.10 system: it looks like namespace packages are entirely broken there. Here is a pdb session to demonstrate: (Pdb) import repoze (Pdb) repoze (Pdb) repoze.__path__ ['/home/wichert/lib/buildout/eggs/repoze.sphinx.autointerface-0.6.2-py2.7.egg/repoze', '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze'] So at this point I can import the repoze namespace packages, which is defined by both repoze.sphinx.autointerface and repoze.formapi. Now I try to import repoze.sphinx.autointerface: (Pdb) import repoze.sphinx.autointerface *** ImportError: No module named autointerface That is unexpected since we saw the repoze.sphinx.autointerface egg was found earlier. So lets look at repoze.sphinx: (Pdb) repoze.sphinx I did not see that coming at all: how can a system sphinx package that is not inside the repoze namespace suddenly appear there? This is especially odd since buildout hooked me up with a sphinx package in the buildout itself: (Pdb) import sphinx I am not sure who is responsible for this behaviour or how to debug this. Does anyone have any useful hints? Wichert. From jim at zope.com Thu Apr 12 15:38:43 2012 From: jim at zope.com (Jim Fulton) Date: Thu, 12 Apr 2012 09:38:43 -0400 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? In-Reply-To: <4F86AB76.1020509@wiggy.net> References: <4F86AB76.1020509@wiggy.net> Message-ID: See the posts from Felix Schwarz here a few days ago. It looks like he ran into and debugged the same issue. I haven't had a chance to wade into it. (I can't say I'm looking forward to it.) I'll try to get up to speed on this this weekend. Jim On Thu, Apr 12, 2012 at 6:16 AM, Wichert Akkerman wrote: > I am running into something very odd on an Ubuntu 11.10 system: it looks > like namespace packages are entirely broken there. Here is a pdb session to > demonstrate: > > (Pdb) import repoze > (Pdb) repoze > '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze/__init__.pyc'> > (Pdb) repoze.__path__ > ['/home/wichert/lib/buildout/eggs/repoze.sphinx.autointerface-0.6.2-py2.7.egg/repoze', > '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze'] > > So at this point I can import the repoze namespace packages, which is > defined by both repoze.sphinx.autointerface and repoze.formapi. Now I try to > import repoze.sphinx.autointerface: > > (Pdb) import repoze.sphinx.autointerface > *** ImportError: No module named autointerface > > That is unexpected since we saw the repoze.sphinx.autointerface egg was > found earlier. So lets look at repoze.sphinx: > > (Pdb) repoze.sphinx > '/usr/lib/pymodules/python2.7/sphinx/__init__.pyc'> > > I did not see that coming at all: how can a system sphinx package that is > not inside the repoze namespace suddenly appear there? This is especially > odd since buildout hooked me up with a sphinx package in the buildout > itself: > > (Pdb) import sphinx > '/home/wichert/lib/buildout/eggs/Sphinx-1.0.1-py2.7.egg/sphinx/__init__.pyc'> > > I am not sure who is responsible for this behaviour or how to debug this. > Does anyone have any useful hints? > > Wichert. > > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://www.dublinstore.com/ From marius at pov.lt Thu Apr 12 16:51:04 2012 From: marius at pov.lt (Marius Gedminas) Date: Thu, 12 Apr 2012 17:51:04 +0300 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? In-Reply-To: <4F86AB76.1020509@wiggy.net> References: <4F86AB76.1020509@wiggy.net> Message-ID: <20120412145104.GA2854@fridge.pov.lt> On Thu, Apr 12, 2012 at 12:16:22PM +0200, Wichert Akkerman wrote: > I am running into something very odd on an Ubuntu 11.10 system: it > looks like namespace packages are entirely broken there. Interesting. As a data point: I use zc.buildout 1.5.2 on Ubuntu 11.10. I haven't encountered any namespace issues yet. > Here is a > pdb session to demonstrate: > > (Pdb) import repoze > (Pdb) repoze > > (Pdb) repoze.__path__ > ['/home/wichert/lib/buildout/eggs/repoze.sphinx.autointerface-0.6.2-py2.7.egg/repoze', '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze'] > > So at this point I can import the repoze namespace packages, which > is defined by both repoze.sphinx.autointerface and repoze.formapi. > Now I try to import repoze.sphinx.autointerface: > > (Pdb) import repoze.sphinx.autointerface > *** ImportError: No module named autointerface > > That is unexpected since we saw the repoze.sphinx.autointerface egg > was found earlier. So lets look at repoze.sphinx: > > (Pdb) repoze.sphinx > '/usr/lib/pymodules/python2.7/sphinx/__init__.pyc'> Do you have a small sample buildout.cfg so that I could try to reproduce this? This one worked for me: $ cat buildout.cfg [buildout] parts = wtf [wtf] recipe = z3c.recipe.scripts # recipe = zc.recipe.egg also worked fine eggs = Sphinx repoze.formapi repoze.sphinx.autointerface interpreter = python $ python bootstrap.py $ bin/python Python 2.7.2+ (default, Oct 4 2011, 20:03:08) >>> import repoze >>> repoze.__path__ ['/home/mg/.buildout/eggs/repoze.formapi-0.5.0-py2.7.egg/repoze', '/home/mg/.buildout/eggs/repoze.sphinx.autointerface-0.6.2-py2.7.egg/repoze'] >>> import repoze.sphinx.autointerface >>> repoze.sphinx even though I also have sphinx installed into my dist-packages (/usr/lib/pymodules/python2.7/sphinx/__init__.pyc exists). > I did not see that coming at all: how can a system sphinx package > that is not inside the repoze namespace suddenly appear there? This > is especially odd since buildout hooked me up with a sphinx package > in the buildout itself: > > (Pdb) import sphinx > > > I am not sure who is responsible for this behaviour or how to debug > this. Does anyone have any useful hints? Not really. I'm afraid when I encounter buildout issues, I'm in the "aaargh no time for yak shaving NOW" mode, so I tend to intuitively twiddle some knobs like 'include-site-packages = false' for 10-15 minutes until it starts working. Marius Gedminas -- Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Digital signature URL: From barry at python.org Thu Apr 12 17:06:14 2012 From: barry at python.org (Barry Warsaw) Date: Thu, 12 Apr 2012 11:06:14 -0400 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? In-Reply-To: <20120412145104.GA2854@fridge.pov.lt> References: <4F86AB76.1020509@wiggy.net> <20120412145104.GA2854@fridge.pov.lt> Message-ID: <20120412110614.6cd3c359@resist.wooz.org> On Apr 12, 2012, at 05:51 PM, Marius Gedminas wrote: >Interesting. As a data point: I use zc.buildout 1.5.2 on Ubuntu 11.10. >I haven't encountered any namespace issues yet. I haven't seen any issues with zc.buildout 1.5.2 on Ubuntu 12.04 either. Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From felix.schwarz at oss.schwarz.eu Thu Apr 12 20:56:45 2012 From: felix.schwarz at oss.schwarz.eu (Felix Schwarz) Date: Thu, 12 Apr 2012 20:56:45 +0200 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? In-Reply-To: References: <4F86AB76.1020509@wiggy.net> Message-ID: <4F87256D.70100@oss.schwarz.eu> Hey, Am 12.04.2012 15:38, schrieb Jim Fulton: > See the posts from Felix Schwarz here a few days ago. It looks like > he ran into and debugged the same issue. I haven't had a chance to wade into it. (I can't > say I'm looking forward to it.) I think my last two emails contain a detailed explaination + workaround patch. If you have any questions, don't hesitate to ask - by now I think I have quite thorough understanding of the issue... fs From wichert at wiggy.net Thu Apr 12 21:24:46 2012 From: wichert at wiggy.net (Wichert Akkerman) Date: Thu, 12 Apr 2012 21:24:46 +0200 Subject: [Distutils] namespace packages broken in ubuntu with zc.buildout 1.5? In-Reply-To: <4F86AB76.1020509@wiggy.net> References: <4F86AB76.1020509@wiggy.net> Message-ID: <4F872BFE.40705@wiggy.net> Let me try to answer some questions that came up: - the buildout I used to reproduce this is this one: https://github.com/euphorie/Euphorie - this was using buildout 1.5.2 On 2012-4-12 12:16, Wichert Akkerman wrote: > I am running into something very odd on an Ubuntu 11.10 system: it looks > like namespace packages are entirely broken there. Here is a pdb session > to demonstrate: > > (Pdb) import repoze > (Pdb) repoze > '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze/__init__.pyc'> > > (Pdb) repoze.__path__ > ['/home/wichert/lib/buildout/eggs/repoze.sphinx.autointerface-0.6.2-py2.7.egg/repoze', > '/home/wichert/lib/buildout/eggs/repoze.formapi-0.4.2-py2.7.egg/repoze'] > > So at this point I can import the repoze namespace packages, which is > defined by both repoze.sphinx.autointerface and repoze.formapi. Now I > try to import repoze.sphinx.autointerface: > > (Pdb) import repoze.sphinx.autointerface > *** ImportError: No module named autointerface > > That is unexpected since we saw the repoze.sphinx.autointerface egg was > found earlier. So lets look at repoze.sphinx: > > (Pdb) repoze.sphinx > '/usr/lib/pymodules/python2.7/sphinx/__init__.pyc'> > > I did not see that coming at all: how can a system sphinx package that > is not inside the repoze namespace suddenly appear there? This is > especially odd since buildout hooked me up with a sphinx package in the > buildout itself: > > (Pdb) import sphinx > '/home/wichert/lib/buildout/eggs/Sphinx-1.0.1-py2.7.egg/sphinx/__init__.pyc'> > > > I am not sure who is responsible for this behaviour or how to debug > this. Does anyone have any useful hints? > > Wichert. > -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. From andrea.crotti.0 at gmail.com Fri Apr 13 11:50:55 2012 From: andrea.crotti.0 at gmail.com (Andrea Crotti) Date: Fri, 13 Apr 2012 10:50:55 +0100 Subject: [Distutils] egg-info & develop Message-ID: <4F87F6FF.6020606@gmail.com> I'm trying to understand exactly when running python setup.py develop is necessary to make sure that everything will work as expected. After some thinking I came to the conclusion that all the information that should be kept up-to-date is in the .egg-info directory. So if I understood correctly means that I only need to run "develop" once and "egg_info" every time I need to update. And as a related topic we would really like to avoid cluttering the directories with these egg-info directories, and with my script I know write them in another known directory. But what happens if pkg_resources or similar try to use these information and don't find the egg-info because it's not where it's supposed to be? Thanks, Andrea From robhealey1 at gmail.com Fri Apr 13 23:35:23 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Fri, 13 Apr 2012 14:35:23 -0700 Subject: [Distutils] types of files... Message-ID: Greetings All: With the help of others and myself, we are moving Gramps[1] from an autotools system to Distutils packaging... I know that Autotools/ makefiles can handle these types of files, but I need to know if it is possible to even a way to handle? a) *.in b) *.keys c) *.xml d) man files with Distutils/ Distutils2? I need to be able to merge different language translations into these files... -- Sincerely yours, Rob G. Healey From pje at telecommunity.com Sun Apr 15 19:30:17 2012 From: pje at telecommunity.com (PJ Eby) Date: Sun, 15 Apr 2012 13:30:17 -0400 Subject: [Distutils] egg-info & develop In-Reply-To: <4F87F6FF.6020606@gmail.com> References: <4F87F6FF.6020606@gmail.com> Message-ID: On Fri, Apr 13, 2012 at 5:50 AM, Andrea Crotti wrote: > I'm trying to understand exactly when running python setup.py develop is > necessary to make sure that everything will work as expected. > > After some thinking I came to the conclusion that all the information > that should be kept up-to-date is in the .egg-info directory. So if I > understood correctly means that I only need to run "develop" once and > "egg_info" every time I need to update. > Not quite correct: if you add new scripts to your project, then you would also need to run develop in that case, to install the new scripts. And as a related topic we would really like to avoid cluttering the > directories with these egg-info directories, and with my script I know > write them in another known directory. > > But what happens if pkg_resources or similar try to use these > information and don't find the egg-info because it's not where it's > supposed to be? > It will either fail to find the package, or add some other directory to sys.path, possibly messing various things up in the process. Using "develop" with a relocated egg-info directory should actually give you an error message; I'm kind of surprised that it's not giving you an error message, unless perhaps you're waiting until *after* you've run "develop" to move the .egg-info. (Either that or I didn't consider that anybody would want to use develop with a manually-relocated .egg-info, and thus didn't put in the error checking.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinout at vanrees.org Mon Apr 16 01:50:05 2012 From: reinout at vanrees.org (Reinout van Rees) Date: Mon, 16 Apr 2012 01:50:05 +0200 Subject: [Distutils] pip on windows: life without eggs ok? Message-ID: Hi, I keep forgetting in discussions that pip doesn't support eggs. Their main usecase is installing binary python eggs on windows, I'd say. I use linux and OSX myself, so my windows experience is limited. Question: is pip's compile-from-source character a problem on windows? Does everyone use a clicky-click .exe installer for binary packages instead of pip? Is easy_install still more popular? Note, I'm not talking about installing pure python packages, but more stuff like mapnik, pil, matplotlib and psycopg2: packages that have C bindings. I'm asking because I'm writing a Django book and I don't want to get clobbered for advising pip when it won't install a mysql or postgres binding without major work. So I'd love some feedback from windows users! (I'm mostly using buildout myself, but I'm only describing that near the end of my book). Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout at vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" From chris at kateandchris.net Mon Apr 16 05:07:03 2012 From: chris at kateandchris.net (Chris Lambacher) Date: Sun, 15 Apr 2012 23:07:03 -0400 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: Message-ID: Hi, If I were telling a new Windows Python user what to do to get started, I would tell them to use easy_install because easy_install will pick up both installers and binary eggs and do the right thing with those and virtualenvs. pip on Windows is a decent into misery. Giving Windows users reliable instructions on how to set up an appropriate compiler is fraught with peril. Probably most new Python users on Windows have never done C or set up a build environment; they probably don't even know what a compiler is or why they would need one. Even if they do know about compilers, getting the right Visual Studio version(express or otherwise) is a bit of a problem because Python does not use the current version of VS and which version you need changes with Python versions. If you get a working compiler, then you need to track down the C dependencies of the module you are building. The click installers are going to be a problem if you do any recommendation of virtualenv. The recent (or soon to be released) versions have --no-site-packages as the default and so, the click installers (that will install to global site-packages directory) won't show up without the user explicitly giving whatever the arg is for --with-site-packages when the virtualenv is created. I heard rumours of plans for pip to support binary packages of some kind on Windows, but I don't know the details or current status of that. -Chris On Sun, Apr 15, 2012 at 7:50 PM, Reinout van Rees wrote: > Hi, > > I keep forgetting in discussions that pip doesn't support eggs. Their main > usecase is installing binary python eggs on windows, I'd say. I use linux > and OSX myself, so my windows experience is limited. > > Question: is pip's compile-from-source character a problem on windows? > Does everyone use a clicky-click .exe installer for binary packages instead > of pip? Is easy_install still more popular? > > > Note, I'm not talking about installing pure python packages, but more > stuff like mapnik, pil, matplotlib and psycopg2: packages that have C > bindings. > > > I'm asking because I'm writing a Django book and I don't want to get > clobbered for advising pip when it won't install a mysql or postgres > binding without major work. So I'd love some feedback from windows users! > > > (I'm mostly using buildout myself, but I'm only describing that near the > end of my book). > > > Reinout > > -- > Reinout van Rees http://reinout.vanrees.org/ > reinout at vanrees.org http://www.nelen-schuurmans.**nl/ > "If you're not sure what to do, make something. -- Paul Graham" > > ______________________________**_________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/**mailman/listinfo/distutils-sig > -- Christopher Lambacher chris at kateandchris.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Mon Apr 16 06:17:05 2012 From: matthew.brett at gmail.com (Matthew Brett) Date: Sun, 15 Apr 2012 21:17:05 -0700 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: Message-ID: Hi, On Sun, Apr 15, 2012 at 8:07 PM, Chris Lambacher wrote: > Hi, > > If I were telling a new Windows Python user what to do to get started, I > would tell them to use easy_install because easy_install will pick up both > installers and binary eggs and do the right thing with those and > virtualenvs. > > pip on Windows is a decent into misery. Seconded; our scientific packages use numpy (C) and scipy (C, C++ Fortran, big) and have C and sometimes Fortran extensions, so pip is more or less useless for windows, and a real PITA for anything else. Best, Matthew From reinout at vanrees.org Mon Apr 16 12:31:32 2012 From: reinout at vanrees.org (Reinout van Rees) Date: Mon, 16 Apr 2012 12:31:32 +0200 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: Message-ID: On 16-04-12 06:17, Matthew Brett wrote: > Hi, > > On Sun, Apr 15, 2012 at 8:07 PM, Chris Lambacher wrote: >> Hi, >> >> If I were telling a new Windows Python user what to do to get started, I >> would tell them to use easy_install because easy_install will pick up both >> installers and binary eggs and do the right thing with those and >> virtualenvs. >> >> pip on Windows is a decent into misery. > > Seconded; our scientific packages use numpy (C) and scipy (C, C++ > Fortran, big) and have C and sometimes Fortran extensions, so pip is > more or less useless for windows, and a real PITA for anything else. Thanks Chris and Matthew for the info! Especially about the upcoming no-site-packages default. I'm really going to have to add a section on debugging site.path to my book... :-) Reinout - happy to be using buildout ;-) -- Reinout van Rees http://reinout.vanrees.org/ reinout at vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" From carl at oddbird.net Mon Apr 16 21:08:05 2012 From: carl at oddbird.net (Carl Meyer) Date: Mon, 16 Apr 2012 13:08:05 -0600 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: Message-ID: <4F8C6E15.9030002@oddbird.net> Hi Chris, On 04/15/2012 09:07 PM, Chris Lambacher wrote: > If I were telling a new Windows Python user what to do to get started, I > would tell them to use easy_install because easy_install will pick up > both installers and binary eggs and do the right thing with those and > virtualenvs. Agreed. > pip on Windows is a decent into misery. Giving Windows users reliable > instructions on how to set up an appropriate compiler is fraught with > peril. Probably most new Python users on Windows have never done C or > set up a build environment; they probably don't even know what a > compiler is or why they would need one. Even if they do know about > compilers, getting the right Visual Studio version(express or otherwise) > is a bit of a problem because Python does not use the current version of > VS and which version you need changes with Python versions. If you get a > working compiler, then you need to track down the C dependencies of the > module you are building. > > The click installers are going to be a problem if you do any > recommendation of virtualenv. The recent (or soon to be released) > versions have --no-site-packages as the default and so, the click > installers (that will install to global site-packages directory) won't > show up without the user explicitly giving whatever the arg is for > --with-site-packages when the virtualenv is created. The argument is spelled --system-site-packages. > I heard rumours of plans for pip to support binary packages of some kind > on Windows, but I don't know the details or current status of that. Support for installing binary packages on Windows has been a "patches welcome" situation for as long as I've used pip (3-4 years?) - all that's lacking is someone motivated to provide a good patch :-) Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From carl at oddbird.net Mon Apr 16 21:04:49 2012 From: carl at oddbird.net (Carl Meyer) Date: Mon, 16 Apr 2012 13:04:49 -0600 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: Message-ID: <4F8C6D51.20902@oddbird.net> Hi Reinout, On 04/16/2012 04:31 AM, Reinout van Rees wrote: > Thanks Chris and Matthew for the info! Especially about the upcoming > no-site-packages default. --no-site-packages has been the default since the release of virtualenv 1.7, which happened on Nov 30, 2011. Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From malope at cicese.mx Mon Apr 16 21:12:46 2012 From: malope at cicese.mx (=?ISO-8859-1?Q?Manuel_L=F3pez?=) Date: Mon, 16 Apr 2012 12:12:46 -0700 Subject: [Distutils] error in windows 7 installation Message-ID: <4F8C6F2E.9050301@cicese.mx> Hello Everybody: I am trying to install distribute-0.6.25 in a windows 7 machine. I have python 2.7.3 in 32 bits, although the machine is 64 bits. I installed the 32 bit python version because I want to install ipython and there is no 64 bit builds of the Windows installer for ipython. In any case, upon installing disuitils with python setup.py install I get the following error error: C:\manuel\prog_red\python\distribute-0.6.25\distribute-0.6.25\setuptools\cli-32.exe: No such file or directory Any help will be greatly appeciated. Thanks, Manuel -- Manuel L?pez Mariscal Depto. de Oceanograf?a F?sica/CICESE malope at cicese.mx From p.f.moore at gmail.com Mon Apr 16 23:56:53 2012 From: p.f.moore at gmail.com (Paul Moore) Date: Mon, 16 Apr 2012 22:56:53 +0100 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: <4F8C6E15.9030002@oddbird.net> References: <4F8C6E15.9030002@oddbird.net> Message-ID: On 16 April 2012 20:08, Carl Meyer wrote: >> I heard rumours of plans for pip to support binary packages of some kind >> on Windows, but I don't know the details or current status of that. > > Support for installing binary packages on Windows has been a "patches > welcome" situation for as long as I've used pip (3-4 years?) - all > that's lacking is someone motivated to provide a good patch :-) Speaking as someone who's looked at this, the problem seems to me to be that pip has a *lot* of baked in assumptions that it's working with source distributions, and it's very hard to see how to fit a binary install mechanism in place. It would be (relatively) easier to add a new "pip bininstall" subcommand, but once you start looking at that, it's not easy to see what it gives you over "easy_install". Personally, I'm waiting to see where the Python 3.3 "packaging" solution fits into all this - as I understand it, it currently hits the same spot as pip (source-install only) but it's less mature. It may be that it will be easier to integrate binary installers into the packaging infrastructure but there's still a lot of debate and no real code in this area (I produced a patch, but it foundered over debates about whether the binary format I proposed was "the right way" to do it). I'd love to see a group of people getting together to really work through the options for binary installers that work with pip/virtualenv/packaging, but the support seems pretty fragmented, and the fact that eggs are a "good enough" solution tends to stall any casual efforts in this direction. Paul. From carl at oddbird.net Tue Apr 17 00:17:38 2012 From: carl at oddbird.net (Carl Meyer) Date: Mon, 16 Apr 2012 16:17:38 -0600 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: References: <4F8C6E15.9030002@oddbird.net> Message-ID: <4F8C9A82.5050005@oddbird.net> On 04/16/2012 03:56 PM, Paul Moore wrote: > On 16 April 2012 20:08, Carl Meyer wrote: >> Support for installing binary packages on Windows has been a "patches >> welcome" situation for as long as I've used pip (3-4 years?) - all >> that's lacking is someone motivated to provide a good patch :-) > > Speaking as someone who's looked at this, the problem seems to me to > be that pip has a *lot* of baked in assumptions that it's working with > source distributions, and it's very hard to see how to fit a binary > install mechanism in place. It would be (relatively) easier to add a > new "pip bininstall" subcommand, but once you start looking at that, > it's not easy to see what it gives you over "easy_install". I'm happy to consult with anyone working on this. I think this particular framing conflates UI issues (what is the command named?) with internal code structure unnecessarily. It's true that much of pip's code is for working with sdists and support for installing binary packages would require some significant new and separate code paths internally (in InstallRequirement and, to a lesser extent, PackageFinder), but the actual user-facing commands (e.g. InstallCommand) are a relatively small part of the code; I don't think adding a separate command would actually save much work over extending the "install" command. But I could be wrong - were there specific issues that you saw as problematic for adding support to "install"? > Personally, I'm waiting to see where the Python 3.3 "packaging" > solution fits into all this - as I understand it, it currently hits > the same spot as pip (source-install only) but it's less mature. It > may be that it will be easier to integrate binary installers into the > packaging infrastructure but there's still a lot of debate and no real > code in this area (I produced a patch, but it foundered over debates > about whether the binary format I proposed was "the right way" to do > it). > > I'd love to see a group of people getting together to really work > through the options for binary installers that work with > pip/virtualenv/packaging, but the support seems pretty fragmented, and > the fact that eggs are a "good enough" solution tends to stall any > casual efforts in this direction. Agreed that focusing on support in d2/packaging is probably a better use of time for the long term. I'm hopeful that at some point pip can lose a lot of code and become a much thinner wrapper around d2/packaging, with added support for things like installing direct from VCS, requirements files, etc. Carl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From robhealey1 at gmail.com Tue Apr 17 08:05:39 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Mon, 16 Apr 2012 23:05:39 -0700 Subject: [Distutils] setup.cfg question??? Message-ID: Greetings: In writing the setup.cfg file, how should the attribute for 'requires-Python' should look??? >From what I can understand, it should look like: requires-Python : '>= 2.6' could you please show me the correct way to have this written??? -- Sincerely yours, Rob G. Healey From p.f.moore at gmail.com Tue Apr 17 09:06:50 2012 From: p.f.moore at gmail.com (Paul Moore) Date: Tue, 17 Apr 2012 08:06:50 +0100 Subject: [Distutils] pip on windows: life without eggs ok? In-Reply-To: <4F8C9A82.5050005@oddbird.net> References: <4F8C6E15.9030002@oddbird.net> <4F8C9A82.5050005@oddbird.net> Message-ID: On 16 April 2012 23:17, Carl Meyer wrote: > I'm happy to consult with anyone working on this. I think this > particular framing conflates UI issues (what is the command named?) with > internal code structure unnecessarily. It's true that much of pip's code > is for working with sdists and support for installing binary packages > would require some significant new and separate code paths internally > (in InstallRequirement and, to a lesser extent, PackageFinder), but the > actual user-facing commands (e.g. InstallCommand) are a relatively small > part of the code; I don't think adding a separate command would actually > save much work over extending the "install" command. But I could be > wrong - were there specific issues that you saw as problematic for > adding support to "install"? It was pretty much what you said - the InstallRequirement changes would be fairly extensive to factor out the reusable parts from the bits that only relate to source installs, and the finder changes (which I hadn't located, but knew would need to be addressed) needed to locate binary distributions as well as source ones. Also, pip reuses setuptools to build source packages, but because easy_install doesn't support --single-version-externally-managed, you can't do that for a binary, so you have to replicate all that logic within pip. Thanks, for the offer, though - if the packaging initiative doesn't come up with anything concrete for 3.3, I might look at this again. Although as I mentioned, I find that in practice, easy_install is good enough for most cases where I need binaries, and hand-unpicking the packages works for the rest (MSI and custom installers). Paul. From eric at netwok.org Tue Apr 17 18:58:13 2012 From: eric at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 17 Apr 2012 12:58:13 -0400 Subject: [Distutils] setup.cfg question??? In-Reply-To: References: Message-ID: <4F8DA125.30901@netwok.org> Good afternoon, > In writing the setup.cfg file, how should the attribute for > 'requires-Python' should look??? > From what I can understand, it should look like: > > requires-Python : '>= 2.6' This is correct, except for the quote marks. The documentation does not presently include an example for this field; you need to combine the information from http://docs.python.org/dev/packaging/setupcfg#syntax (which tells you that "requires-python =" and requires-python:" are valid, with capitalization and whitespace ignored), http://docs.python.org/dev/packaging/setupcfg#metadata (which says that the value for this field is defined in PEP 345) and http://www.python.org/dev/peps/pep-0345/#requires-python (for the version predicate format). Regards From merwok at netwok.org Tue Apr 17 19:17:22 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 17 Apr 2012 13:17:22 -0400 Subject: [Distutils] types of files... In-Reply-To: References: Message-ID: <4F8DA5A2.5020906@netwok.org> Greetings, > With the help of others and myself, we are moving Gramps[1] from an > autotools system to Distutils packaging... > > I know that Autotools/ makefiles can handle these types of files, but > I need to know if it is possible to even a way to handle? > a) *.in > b) *.keys > c) *.xml > d) man files > with Distutils/ Distutils2? It depends on what you mean with ?handle?. Out of the box, distutils can compile C sources and it can install Python modules, extension modules (written in C), scripts, data files that are supposed to go in the same directory as a package (called package_data), data files that are supposed to go to arbitrary locations in the system (called data_files). So if you declare for example man files as data files, distutils will install them for you, but in a fragile, platform-dependent way: you will have to hard-code the destinations in your setup.py. Countless posts on this mailing list and stack overflow show how this situation is unsatisfactory. distutils2 is smarter when installing: you associate files with categories in your setup.cfg file and d2 will install them to the right locations for each system (see http://docs.python.org/dev/packaging/setupcfg#resources). In your program code, you can call distutils2.database.get_file_path and get_file to access the installed files. > I need to be able to merge different language translations into these files... Then you need a custom command for the build step. There are various projects on PyPI which implement this; I don?t have access to my bookmarks now, but from the top of my head there are Babel, van.potomo, 4Suite. Beware that some of them don?t work with pure distutils but require setuptools, which may be a good or a bad thing depending on your needs and tastes. Note that distutils2 is able to use distutils1-based commands, or will be when I have fixed a bug that I found last Saturday :) If you have more questions, please ask them. Regards From merwok at netwok.org Tue Apr 17 19:28:24 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 17 Apr 2012 13:28:24 -0400 Subject: [Distutils] Installation In-Reply-To: References: Message-ID: <4F8DA838.7040406@netwok.org> Hello, Le 09/02/2012 10:11, Erik Bray a ?crit : > Distutils2 is included in Python 3 under the name 'packaging' which is > where, I believe, most of its development is focused. The > "distutils2" name is used for the backport of packaging to Python 2.x > as well as Python 3.x prior to the availability of packaging in the > standard library. This is correct, except for one point (see below). > Confused yet? There are some historical reasons for all that, but the > main point is that if you're interested in working on distutils2, you > really want to up and running on the main Python development branch > and work on *packaging*. I think that most of the work is being done > there, and then backported to distutils2. My personal preference is to work in the cpython repository, because I prefer Python 3 and the stdlib?s test runner is useful (finds reference leaks, finds tests that modify the environment and don?t restore it, this kind of things). Contributors however are free to work from a distutils2 clone if that?s easier for them: both codebases are synchronized and I gladly port patches. Cheers From merwok at netwok.org Tue Apr 17 19:31:38 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 17 Apr 2012 13:31:38 -0400 Subject: [Distutils] greetings, first email... In-Reply-To: References: Message-ID: <4F8DA8FA.3010908@netwok.org> Howdy Rob, I was going through my backlog and noticed this email was unanswered. > [Frog at PouncingAliens geps0065]$ python setup.py sdist > running sdist > running check > Merging translations into data/gramps.desktop. > Merging translations into data/gramps.xml. > CREATED data/gramps.xml > Merging translations into data/gramps.keys. > CREATED ./data/gramps.keys > Traceback (most recent call last): > File "setup.py", line 487, in > main() > File "setup.py", line 483, in main > 'uninstall': GrampsUninstall} > File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup > dist.run_commands() > File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands > self.run_command(cmd) > File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command > cmd_obj.run() > File "/usr/lib64/python2.7/distutils/command/sdist.py", line 160, in run > self.get_file_list() > File "/usr/lib64/python2.7/distutils/command/sdist.py", line 200, in > get_file_list > self.add_defaults() > File "/usr/lib64/python2.7/distutils/command/sdist.py", line 256, in > add_defaults > build_py = self.get_finalized_command('build_py') > File "/usr/lib64/python2.7/distutils/cmd.py", line 312, in > get_finalized_command > cmd_obj.ensure_finalized() > File "/usr/lib64/python2.7/distutils/cmd.py", line 109, in > ensure_finalized > self.finalize_options() > File "/usr/lib64/python2.7/distutils/command/build_py.py", line 46, in > finalize_options > ('force', 'force')) > File "/usr/lib64/python2.7/distutils/cmd.py", line 302, in > set_undefined_options > getattr(src_cmd_obj, src_option)) > File "/usr/lib64/python2.7/distutils/cmd.py", line 105, in __getattr__ > raise AttributeError, attr > AttributeError: build_lib Is the setup.py file visible somewhere? I would need to read the source for your custom command. Regards From merwok at netwok.org Tue Apr 17 19:42:06 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 17 Apr 2012 13:42:06 -0400 Subject: [Distutils] Installing subpackages under common superpackage In-Reply-To: References: <1333467317.25743.140661057800597.39FC2056@webmail.messagingengine.com> Message-ID: <4F8DAB6E.7080206@netwok.org> Hi, Le 03/04/2012 11:53, Rob Healey a ?crit : > The only way that I could tell you about a project that kind of does what > you are looking for is already done somewhat in Distutils2-1.0a4 tarball... This is incorrect. What Otto asked for is called namespace packages and its status is a bit complicated. - If you use only the standard library, then http://docs.python.org/library/pkgutil#pkgutil.extend_path can be used. On the packaging side, you can use distutils to package your two projects and the second installed will overwrite __init__.py, which is okay given that the contents will be the same. - Most people use the flavor of namespace packages provided by setuptools. (setuptools is a set of extensions to distutils which people tend to love or hate.) I don?t remember how it differs from the pkgutil flavor, but the docs for setuptools and distribute (a setuptools fork) should explain it. - There is an ongoing discussion to add better namespace packages in Python 3.3. When it?s done, packaging/distutils2 will add support for it. Cheers From robhealey1 at gmail.com Tue Apr 17 19:56:52 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 17 Apr 2012 10:56:52 -0700 Subject: [Distutils] greetings, first email... In-Reply-To: <4F8DA8FA.3010908@netwok.org> References: <4F8DA8FA.3010908@netwok.org> Message-ID: Dear Eric: I am happy to say that you may disregard this email as it no longer applies! Sincerely yours, Rob G. Healey On Tue, Apr 17, 2012 at 10:31 AM, ?ric Araujo wrote: > Howdy Rob, > > I was going through my backlog and noticed this email was unanswered. > >> [Frog at PouncingAliens geps0065]$ python setup.py sdist >> running sdist >> running check >> Merging translations into data/gramps.desktop. >> Merging translations into data/gramps.xml. >> CREATED data/gramps.xml >> Merging translations into data/gramps.keys. >> CREATED ./data/gramps.keys >> Traceback (most recent call last): >> ? File "setup.py", line 487, in >> ? ? main() >> ? File "setup.py", line 483, in main >> ? ? 'uninstall': GrampsUninstall} >> ? File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup >> ? ? dist.run_commands() >> ? File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands >> ? ? self.run_command(cmd) >> ? File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command >> ? ? cmd_obj.run() >> ? File "/usr/lib64/python2.7/distutils/command/sdist.py", line 160, in run >> ? ? self.get_file_list() >> ? File "/usr/lib64/python2.7/distutils/command/sdist.py", line 200, in >> get_file_list >> ? ? self.add_defaults() >> ? File "/usr/lib64/python2.7/distutils/command/sdist.py", line 256, in >> add_defaults >> ? ? build_py = self.get_finalized_command('build_py') >> ? File "/usr/lib64/python2.7/distutils/cmd.py", line 312, in >> get_finalized_command >> ? ? cmd_obj.ensure_finalized() >> ? File "/usr/lib64/python2.7/distutils/cmd.py", line 109, in >> ensure_finalized >> ? ? self.finalize_options() >> ? File "/usr/lib64/python2.7/distutils/command/build_py.py", line 46, in >> finalize_options >> ? ? ('force', 'force')) >> ? File "/usr/lib64/python2.7/distutils/cmd.py", line 302, in >> set_undefined_options >> ? ? getattr(src_cmd_obj, src_option)) >> ? File "/usr/lib64/python2.7/distutils/cmd.py", line 105, in __getattr__ >> ? ? raise AttributeError, attr >> AttributeError: build_lib > > > Is the setup.py file visible somewhere? ?I would need to read the source for > your custom command. > > Regards > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey From robhealey1 at gmail.com Sat Apr 21 02:11:11 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Fri, 20 Apr 2012 17:11:11 -0700 Subject: [Distutils] command hooks... Message-ID: Greetings All: I would like to know if anyone could help me with this problem? Here is where you can find the files that are involved in this issue: 1) http://dl.dropbox.com/u/47247655/setup.cfg 2) http://dl.dropbox.com/u/47247655/setup_custom.py These files are held in the public folder of my DropBox account... Any help that you can give to me would be greatly appreciated! BTW, these two files are within the same directory within the same project! Here is the error that I get: [root at SwimmingAntelope gep-026]# pysetup run install_dist running install_dist setup_custom Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 651, in main return dispatcher() File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 639, in __call__ return func(self, self.args) File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 91, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/distutils2/run.py", line 285, in _run dist.run_command(cmd, dispatcher.command_options[cmd]) File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line 709, in run_command cmd_obj.run() File "/usr/lib/python2.7/site-packages/distutils2/command/install_dist.py", line 509, in run self.run_command('build') File "/usr/lib/python2.7/site-packages/distutils2/command/cmd.py", line 330, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line 707, in run_command self.run_command_hooks(cmd_obj, 'pre_hook') File "/usr/lib/python2.7/site-packages/distutils2/dist.py", line 732, in run_command_hooks raise PackagingModuleError(e) PackagingModuleError: setup_custom -- Sincerely yours, Rob G. Healey From merwok at netwok.org Sat Apr 21 02:32:57 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Fri, 20 Apr 2012 20:32:57 -0400 Subject: [Distutils] command hooks... In-Reply-To: References: Message-ID: <4F920039.9050402@netwok.org> Good evening, > BTW, these two files are within the same directory within the same project! > Here is the error that I get: > [...] > PackagingModuleError: setup_custom This looks like http://bugs.python.org/issue11637 The project directory needs to be added to sys.path when running command hooks. I have a patch in progress and will commit it when I get some spare round tuits. Thank you for testing and sending feedback! Regards From robhealey1 at gmail.com Sat Apr 21 04:53:05 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Fri, 20 Apr 2012 19:53:05 -0700 Subject: [Distutils] command hooks... In-Reply-To: <4F920039.9050402@netwok.org> References: <4F920039.9050402@netwok.org> Message-ID: Dear Eric: Is Distutils2 kind of your baby? Simply, you are the only one working on it! I am curious as to what you mean by this statement, when I get some spare round tuits? >From the bug tracker page, this has been around for over a year! I applied the diff file that was attached to the page to the current Python-3.3.0a2, and it doesn't make a bit of difference on the outcome... I also added the path to sys.path, like this: sys.path.append(os.getcwd()) and it doesn't make a difference! After the upcoming Distutils2 sprint, when will the work be patched into Distutils2? When will we see the benefit of all the work that will be done??? 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py 2) http://dl.dropbox.com/u/47247655/setup_custom.py 3) http://dl.dropbox.com/u/47247655/setup.cfg 1) Will create the setup.cfg file if one is not there...? The rest, you know about already... I have updated 2 and 3 and uploaded the new ones... Sincerely yours, Rob G. Healey On Fri, Apr 20, 2012 at 5:32 PM, ?ric Araujo wrote: > Good evening, > >> BTW, these two files are within the same directory within the same project! >> Here is the error that I get: >> [...] >> PackagingModuleError: setup_custom > > This looks like http://bugs.python.org/issue11637 > The project directory needs to be added to sys.path when running command > hooks. ?I have a patch in progress and will commit it when I get some > spare round tuits. > > Thank you for testing and sending feedback! > > Regards > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey From merwok at netwok.org Sat Apr 21 07:51:40 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Sat, 21 Apr 2012 01:51:40 -0400 Subject: [Distutils] command hooks... In-Reply-To: References: <4F920039.9050402@netwok.org> Message-ID: <4F924AEC.9030501@netwok.org> Hi again, > Is Distutils2 kind of your baby? Simply, you are the only one working > on it! It?s more like my foster kid. At first there was distutils, in the standard library since 1999. After a few years it stopped being actively developed, and people started to rely on undocumented behavior and internal things. Four years ago Tarek Ziad? became the new maintainer for distutils and attacked the big pile of bugs and feature requests. He hit a barrier when his changes broke other people?s code, so it was decided two years ago to stop adding new features or clean up code in distutils and instead start anew in a project named distutils2, where backward compatibility would not stall all improvement efforts. That?s when I started contributing, as a Google Summer of Code student and then a volunteer. Tarek focused on distutils2 and passed on the maintenance of distutils to me, and later I also became the maintainer of distutils2, i.e. I reply to most bugs and make the releases. Tarek is still the lead of the project and weighs in for important changes. > I am curious as to what you mean by this statement, when I get > some spare round tuits? That?s a wordplay from the expression ?I?ll get around to it? ? ?I?ll get a round tuit?. > From the bug tracker page, this has been around for over a year! Bugs live from a few minutes to a few years; with more than 300 bugs on my list, I can?t get to everything at the same time. For the last months I?ve also been busy with paperwork and a new job. But be sure the bug is not forgotten; it?s one of the things that will be fixed before distutils2 1.0 and Python 3.3.0. > I applied the diff file that was attached to the page to the current > Python-3.3.0a2, and it doesn't make a bit of difference on the > outcome... If you read the full bug report you?ll see that this patch was already applied and only fixes setup hooks; I said that I was working on a patch for commands hooks but I did not upload it as it was not finished. > I also added the path to sys.path, like this: > sys.path.append(os.getcwd()) and it doesn't make a difference! Probably because you did that in your code, but that makes no difference because it happens after pysetup is started and tries to import your module. I don?t know if I?ll have time to fix this bug tomorrow, as I?ll have mentoring to do, so no promises here. > After the upcoming Distutils2 sprint, when will the work be patched > into Distutils2? When will we see the benefit of all the work that > will be done??? The changes from the sprint will go into the main repository immediately, and after a short while they will get ported into packaging in the cpython repository. I want to release distutils2 1.0a5 soon after the sprint. > 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py > [...] > 1) Will create the setup.cfg file if one is not there...? As you?re using open('setup.cfg', 'w'), the file will be recreated each time you run the script. I?m not sure you need that script; why not just create the config file once and keep it updated when you have changes? Regards From robhealey1 at gmail.com Sat Apr 21 09:56:29 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Sat, 21 Apr 2012 00:56:29 -0700 Subject: [Distutils] command hooks... In-Reply-To: <4F924AEC.9030501@netwok.org> References: <4F920039.9050402@netwok.org> <4F924AEC.9030501@netwok.org> Message-ID: Dear Eric: On Fri, Apr 20, 2012 at 10:51 PM, ?ric Araujo wrote: > Hi again, > >> Is Distutils2 kind of your baby? ?Simply, you are the only one working on it! > It?s more like my foster kid. ?At first there was distutils, in the > standard library since 1999. ?After a few years it stopped being actively developed, and people started to rely on undocumented behavior and internal things. ?Four years ago Tarek Ziad? became the new maintainer for distutils and attacked the big pile of bugs and feature requests. ?He hit a barrier when his changes broke other people?s code, so it was decided two years ago to stop adding new features or clean up code in distutils and instead start anew in a project named distutils2, where backward compatibility would not stall all improvement efforts. That?s when I started contributing, as a Google Summer of Code student > and then a volunteer. ?Tarek focused on distutils2 and passed on the maintenance of distutils to me, and later I also became the maintainer of distutils2, i.e. I reply to most bugs and make the releases. ?Tarek is still the lead of the project and weighs in for important changes. I understand now! My role at gramps is something like that too in one manner of updating the two plugins in the webreport directory, NarrativeWeb.py and WebCal.py... I am full owner and maintainer of my plugin, EditExifImageMetadata.py, which allows editing and creation of metadata fields for images... Now anyone else can also modify this plugin and also the plugins listed above, but it mainly falls on my shoulders... > >> I am curious as to what you mean by this statement, when I get some spare round tuits? > That?s a wordplay from the expression ?I?ll get around to it? ? ?I?ll get a round tuit?. I like it... > >> From the bug tracker page, this has been around for over a year! Bugs live from a few minutes to a few years; with more than 300 bugs on my list, I can?t get to everything at the same time. ?For the last months I?ve also been busy with paperwork and a new job. ?But be sure the bug is not forgotten; it?s one of the things that will be fixed before distutils2 1.0 and Python 3.3.0. After the sprint and you release Distutils2-1.0a5, would you also update the version_info too? If you import distutils2, and then distutils2.version_info, you get a3 not a4? > >> I applied the diff file that was attached to the page to the current Python-3.3.0a2, and it doesn't make a bit of difference on the outcome... Obviously, I didn't get that far in reading the bug tracker! I will re-download Python-3.3.0a2 and re-install it without the extra diff file... > If you read the full bug report you?ll see that this patch was already applied and only fixes setup hooks; I said that I was working on a patch for commands hooks but I did not upload it as it was not finished. I am more than willing to do testing of the patch for you if you would like? Is there a way for me to get svn or git access to the developmental version of Distutils2? Since I am legally blind and have kidney failure, I spend a whole lot of time at home on my computer! It is also one extra thing that I do at gramps is alpha and beta testing... > >> I also added the path to sys.path, like this: >> sys.path.append(os.getcwd()) and it doesn't make a difference! What would I do in Linux to add my directory to the permanent $PYTHONPATH??? > Probably because you did that in your code, but that makes no difference because it happens after pysetup is started and tries to import your module. ?I don?t know if I?ll have time to fix this bug tomorrow, as I?ll have mentoring to do, so no promises here. Is there access to the bug tracker for simply Distutils2 only? I would like to see it and start getting familiar with the Distutils2 code??? > >> After the upcoming Distutils2 sprint, when will the work be patched into Distutils2? ?When will we see the benefit of all the work that will be done??? > The changes from the sprint will go into the main repository > immediately, and after a short while they will get ported into packaging in the cpython repository. ?I want to release distutils2 1.0a5 soon after the sprint. I will certainly be looking forward to it! Once again, I have a lot of time on my hands, so I am willing to do alpha/ beta testing... > >> 1) http://dl.dropbox.com/u/47247655/create_setup_cfg.py >> [...] >> 1) Will create the setup.cfg file if one is not there...? > As you?re using open('setup.cfg', 'w'), the file will be recreated each time you run the script. ?I?m not sure you need that script; why not just create the config file once and keep it updated when you have changes? You are correct about, why not just update the setup.cfg file instead of creating one each time I make changes! Sincerely yours, Rob G. Healey > > Regards > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey From robhealey1 at gmail.com Sun Apr 22 04:30:19 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Sat, 21 Apr 2012 19:30:19 -0700 Subject: [Distutils] version_info Message-ID: Greetings: Could anyone tell me why distutils and distutils2 do NOT have available 'version_info'? I have to use '__version__' to get their version information ... I know that Distutils2 is certainly not close to being production ready, but I am just curious? -- Sincerely yours, Rob G. Healey From merwok at netwok.org Sun Apr 22 07:28:12 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Sun, 22 Apr 2012 01:28:12 -0400 Subject: [Distutils] version_info In-Reply-To: References: Message-ID: <4F9396EC.50801@netwok.org> Hello, > Could anyone tell me why distutils and distutils2 do NOT have > available 'version_info'? I have to use '__version__' to get their > version information ... __version__ is semi-standard and version_info even less. PEP 396 attempts to improve this but is not accepted yet. Anyway if you want to do comparisons (which I assume is the reason you want a version_info) you can just use __version__ with the distutils2.version.NormalizedVersion class. Regards From merwok at netwok.org Sun Apr 22 07:45:22 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Sun, 22 Apr 2012 01:45:22 -0400 Subject: [Distutils] command hooks... In-Reply-To: References: <4F920039.9050402@netwok.org> <4F924AEC.9030501@netwok.org> Message-ID: <4F939AF2.2040300@netwok.org> Hi, > After the sprint and you release Distutils2-1.0a5, would you also > update the version_info too? If you import distutils2, and then > distutils2.version_info, you get a3 not a4? I forgot to update distutils2.__version__ when I cut my first release :) Now I will remember it. > I will re-download Python-3.3.0a2 and re-install it without the > extra diff file... Yeah, editing a real installation to test things is fragile. Better use a Mercurial clone that is not installed and that lets you revert changes. Help is found at http://docs.python.org/devguide . > I am more than willing to do testing of the patch for you if you would > like? Is there a way for me to get svn or git access to the > developmental version of Distutils2? hg clone http://hg.python.org/distutils2 I haven?t finished my patch because I ended up fixing too many things at once: hooks need to add the project directory to sys.path, hooks errors should result in warnings but not stop all operation, and maybe another bug. I need to split that into smaller changes. Do you have a user account on bugs.python.org? Now that I know that you?re willing to test things or give your opinion as a user (thanks!), if you create an account it will makes it easy to add you to a bug discussion. > What would I do in Linux to add my directory to the permanent > $PYTHONPATH??? Many ways to do that, but it is not a correct solution here. When you run pysetup, it should put the project directory in sys.path without the user having to do anything (and with my patch it does). > Is there access to the bug tracker for simply Distutils2 only? I > would like to see it and start getting familiar with the Distutils2 > code??? The bug tracker has categories, called components, and there is one for d2: http://is.gd/mFZfqo . Some of the bugs are tagged ?easy? to mean that they are good introductory bugs for people wanting to work on d2. I also intend to write more wiki pages or blog posts to explain how the codebase is laid out and internally works to reduce the bus factor of d2. Best regards From japsai at gmail.com Sun Apr 22 17:22:43 2012 From: japsai at gmail.com (Jasper van den Bosch) Date: Sun, 22 Apr 2012 17:22:43 +0200 Subject: [Distutils] setuptools feature: tag_git_description like tag_svn_revision Message-ID: Hello all, Might it be an idea to have an option like 'tag_git_description' similar to tag_svn_revision? A possible implementation could use git describe; such as suggested by Douglas Creager in this gist: https://gist.github.com/300803. I am currently using this for my packages, but it might be nice to integrate it into setuptools. Jasper van den Bosch -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanno at hannosch.eu Sun Apr 22 17:33:04 2012 From: hanno at hannosch.eu (Hanno Schlichting) Date: Sun, 22 Apr 2012 17:33:04 +0200 Subject: [Distutils] setuptools feature: tag_git_description like tag_svn_revision In-Reply-To: References: Message-ID: On Sun, Apr 22, 2012 at 5:22 PM, Jasper van den Bosch wrote: > Might it be an idea to have an option like 'tag_git_description' similar to > tag_svn_revision? A possible implementation could use git describe; such as > suggested by Douglas Creager in this gist:?https://gist.github.com/300803. I > am currently using this for my packages, but it might be nice to integrate > it into setuptools. The automatic SVN support is pretty controversial in setuptools and at least for distribute we more or less decided to not expand it further. But there's various revision control specific packages, you can use: http://pypi.python.org/pypi/setuptools-git http://pypi.python.org/pypi/setuptools_bzr http://pypi.python.org/pypi/setuptools_hg http://pypi.python.org/pypi/setuptools_subversion (for SVN 1.7+) If you have git specific ideas, it's best to follow up with the maintainers of setuptools-git. Hanno From jasper at ilogue.com Sun Apr 22 18:02:01 2012 From: jasper at ilogue.com (Jasper van den Bosch) Date: Sun, 22 Apr 2012 18:02:01 +0200 Subject: [Distutils] setuptools feature: tag_git_description like tag_svn_revision In-Reply-To: References: Message-ID: Alright, thanks Jasper On Sun, Apr 22, 2012 at 5:33 PM, Hanno Schlichting wrote: > On Sun, Apr 22, 2012 at 5:22 PM, Jasper van den Bosch > wrote: > > Might it be an idea to have an option like 'tag_git_description' similar > to > > tag_svn_revision? A possible implementation could use git describe; such > as > > suggested by Douglas Creager in this gist: > https://gist.github.com/300803. I > > am currently using this for my packages, but it might be nice to > integrate > > it into setuptools. > > The automatic SVN support is pretty controversial in setuptools and at > least for distribute we more or less decided to not expand it further. > > But there's various revision control specific packages, you can use: > > http://pypi.python.org/pypi/setuptools-git > http://pypi.python.org/pypi/setuptools_bzr > http://pypi.python.org/pypi/setuptools_hg > http://pypi.python.org/pypi/setuptools_subversion (for SVN 1.7+) > > If you have git specific ideas, it's best to follow up with the > maintainers of setuptools-git. > > Hanno > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robhealey1 at gmail.com Mon Apr 23 08:38:28 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Sun, 22 Apr 2012 23:38:28 -0700 Subject: [Distutils] command_hooks and Python-3.3.0a3??? Message-ID: Greetings: Do you know if the command_hooks patch will get into Python-3.3.0a3 before the end of next week when it is suppose to be released? I truly hope so because I am stuck because command hooks are not working for me??? I hope that I am NOT being too pushy as I know that Eric is go busy already! -- Sincerely yours, Rob G. Healey From merwok at netwok.org Tue Apr 24 16:25:50 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Tue, 24 Apr 2012 10:25:50 -0400 Subject: [Distutils] command_hooks and Python-3.3.0a3??? In-Reply-To: References: Message-ID: <4F96B7EE.7060707@netwok.org> Good morning, > Do you know if the command_hooks patch will get into Python-3.3.0a3 > before the end of next week when it is suppose to be released? I don?t know. I don?t really focus on the Python alpha releases; I have my eyes on the first beta, which will mean feature freeze for packaging and distutils2: after that point it won?t be possible to add or remove features, only bug fixes will be allowed. The command hooks bug fix may go in before or after the beta; I?ll try to add the develop command before; I don?t know if the scripts generation feature (something like setuptools? console_scripts/gui_scripts entry points) will be ready in time. In the worst case people unsatisfied with packaging 1.0 in Python 3.3 will be able to use it to install a distutils2 2.0 release from PyPI. Cheers From robhealey1 at gmail.com Wed Apr 25 06:24:31 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 24 Apr 2012 21:24:31 -0700 Subject: [Distutils] clone Distutils2 Message-ID: Greetings: I tried to clone Distutils2, but I got this error: [Frog at PantingGiraffe ~]$ git clone http://hg.python.org/Distutils2 Cloning into 'Distutils2'... fatal: http://hg.python.org/Distutils2/info/refs not found: did you run git update-server-info on the server? Could you tell me what I did wrong? -- Sincerely yours, Rob G. Healey From merwok at netwok.org Wed Apr 25 06:26:15 2012 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Wed, 25 Apr 2012 00:26:15 -0400 Subject: [Distutils] clone Distutils2 In-Reply-To: References: Message-ID: <4F977CE7.3050100@netwok.org> > Could you tell me what I did wrong? You used git instead of Mercurial. :) From robhealey1 at gmail.com Wed Apr 25 06:43:00 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 24 Apr 2012 21:43:00 -0700 Subject: [Distutils] clone Distutils2 In-Reply-To: <4F977CE7.3050100@netwok.org> References: <4F977CE7.3050100@netwok.org> Message-ID: Eric: This is from my terminal: [root at PantingGiraffe dummy]# yum install git mercuriel Loaded plugins: langpacks, refresh-packagekit Package git-1.7.10-1.fc17.x86_64 already installed and latest version No package mercuriel available. Nothing to do Sincerely yours, Rob G. Healey On Tue, Apr 24, 2012 at 9:26 PM, ?ric Araujo wrote: >> Could you tell me what I did wrong? > > You used git instead of Mercurial. :) > _______________________________________________ > Distutils-SIG maillist ?- ?Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Sincerely yours, Rob G. Healey From jon at multani.info Wed Apr 25 06:48:38 2012 From: jon at multani.info (Jonathan Ballet) Date: Wed, 25 Apr 2012 11:48:38 +0700 Subject: [Distutils] clone Distutils2 In-Reply-To: References: <4F977CE7.3050100@netwok.org> Message-ID: <20120425044836.GA6215@localhost> On Tue, Apr 24, 2012 at 09:43:00PM -0700, Rob Healey wrote: > Eric: > > This is from my terminal: > [root at PantingGiraffe dummy]# yum install git mercuriel > Loaded plugins: langpacks, refresh-packagekit > Package git-1.7.10-1.fc17.x86_64 already installed and latest version > No package mercuriel available. This is "mercurial", not "mercuriel". Also, see http://mercurial.selenic.com/wiki/Download#Linux_.28.rpm.29 Jonathan From robhealey1 at gmail.com Wed Apr 25 07:36:46 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Tue, 24 Apr 2012 22:36:46 -0700 Subject: [Distutils] clone Distutils2 In-Reply-To: <20120425044836.GA6215@localhost> References: <4F977CE7.3050100@netwok.org> <20120425044836.GA6215@localhost> Message-ID: Greetings: Thank you very much for pointing out that I had typed it wrong! I noticed it after I had already sent out the email that I was wrong! i got mercurial and distutils2 now! Thank you or taking the time to write and for the correction... Sincerely yours, Rob G. Healey On Tue, Apr 24, 2012 at 9:48 PM, Jonathan Ballet wrote: > On Tue, Apr 24, 2012 at 09:43:00PM -0700, Rob Healey wrote: >> Eric: >> >> This is from my terminal: >> [root at PantingGiraffe dummy]# yum install git mercuriel >> Loaded plugins: langpacks, refresh-packagekit >> Package git-1.7.10-1.fc17.x86_64 already installed and latest version >> No package mercuriel available. > > This is "mercurial", not "mercuriel". > Also, see http://mercurial.selenic.com/wiki/Download#Linux_.28.rpm.29 > > ?Jonathan -- Sincerely yours, Rob G. Healey From doug.hellmann at gmail.com Wed Apr 25 19:33:35 2012 From: doug.hellmann at gmail.com (Doug Hellmann) Date: Wed, 25 Apr 2012 13:33:35 -0400 Subject: [Distutils] need guidance on state-of-the-art for "entry points" Message-ID: Dear Fellowship, I am starting a new project which will be heavily extensible using plugins defined in other people's packages over which I have little or no control. I was planning to use setuptools entry points to manage the plugin discovery, since it has worked so well for virtualenvwrapper. However, in the process of searching for current documentation to reference in the project documentation, I got lost and confused about what is currently supported and what is deprecated. Can someone tell me the currently approved way to work with a modern version of entry points? Should I continue to use distribute/setuptools as before? Should I move to distutils2 and some new metadata in the setup.cfg file? Should I be using Tarek's "extensions" package? If so, how do I tell distutils2 to run the registration code during installation? Thanks, Doug From Ronny.Pfannschmidt at gmx.de Wed Apr 25 19:39:22 2012 From: Ronny.Pfannschmidt at gmx.de (Ronny Pfannschmidt) Date: Wed, 25 Apr 2012 19:39:22 +0200 Subject: [Distutils] need guidance on state-of-the-art for "entry points" In-Reply-To: References: Message-ID: <4F9836CA.1030508@gmx.de> Hi doug, currently just distribute/setuptools is the way to go, later on packaging/ds2 will probably provide a replacement, but thats currently not usable/feature complete -- Ronny On 04/25/2012 07:33 PM, Doug Hellmann wrote: > Dear Fellowship, > > I am starting a new project which will be heavily extensible using plugins defined in other people's packages over which I have little or no control. I was planning to use setuptools entry points to manage the plugin discovery, since it has worked so well for virtualenvwrapper. However, in the process of searching for current documentation to reference in the project documentation, I got lost and confused about what is currently supported and what is deprecated. > > Can someone tell me the currently approved way to work with a modern version of entry points? Should I continue to use distribute/setuptools as before? Should I move to distutils2 and some new metadata in the setup.cfg file? Should I be using Tarek's "extensions" package? If so, how do I tell distutils2 to run the registration code during installation? > > Thanks, > Doug > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig From doug.hellmann at gmail.com Wed Apr 25 21:30:26 2012 From: doug.hellmann at gmail.com (Doug Hellmann) Date: Wed, 25 Apr 2012 15:30:26 -0400 Subject: [Distutils] need guidance on state-of-the-art for "entry points" In-Reply-To: <4F9836CA.1030508@gmx.de> References: <4F9836CA.1030508@gmx.de> Message-ID: OK, thanks! On Apr 25, 2012, at 1:39 PM, Ronny Pfannschmidt wrote: > Hi doug, > > currently just distribute/setuptools is the way to go, > later on packaging/ds2 will probably provide a replacement, > but thats currently not usable/feature complete > > -- Ronny > > On 04/25/2012 07:33 PM, Doug Hellmann wrote: >> Dear Fellowship, >> >> I am starting a new project which will be heavily extensible using plugins defined in other people's packages over which I have little or no control. I was planning to use setuptools entry points to manage the plugin discovery, since it has worked so well for virtualenvwrapper. However, in the process of searching for current documentation to reference in the project documentation, I got lost and confused about what is currently supported and what is deprecated. >> >> Can someone tell me the currently approved way to work with a modern version of entry points? Should I continue to use distribute/setuptools as before? Should I move to distutils2 and some new metadata in the setup.cfg file? Should I be using Tarek's "extensions" package? If so, how do I tell distutils2 to run the registration code during installation? >> >> Thanks, >> Doug >> >> _______________________________________________ >> Distutils-SIG maillist - Distutils-SIG at python.org >> http://mail.python.org/mailman/listinfo/distutils-sig > From chris.jerdonek at gmail.com Wed Apr 25 21:48:10 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Wed, 25 Apr 2012 12:48:10 -0700 Subject: [Distutils] documentation recommendations for Python 3 installs Message-ID: I'd like advice on what instructions to provide to users (if any) to avoid what might be a common user error. I maintain a project written in Python 2, and I recently added support for Python 3 via 2to3 and the installation process. Recently, a Python 3 user got the source code, manually installed it by running "setup.py build" and "setup.py install," and then proceeded to test it by firing up the IDE and importing the project. They then got a syntax error because they were still in the project directory and so wound up importing the original Python 2 code rather than the Python 3 version in site-packages. What is the recommended workflow or instructions to include in a project README to prevent new users from running into this kind of error? Thanks, --Chris From robhealey1 at gmail.com Fri Apr 27 02:49:08 2012 From: robhealey1 at gmail.com (Rob Healey) Date: Thu, 26 Apr 2012 17:49:08 -0700 Subject: [Distutils] hg ChangeLog... Message-ID: Greetings: I am new to using mercurial, and I would like to know if there is something equivalent to subversion's ChangeLog, which shows me what changes have been done and its revision number and who did the changes... Is it possible to do the same with mercurial and if yes, what command would I run??? -- Sincerely yours, Rob G. Healey From marius at pov.lt Sat Apr 28 00:14:52 2012 From: marius at pov.lt (Marius Gedminas) Date: Sat, 28 Apr 2012 01:14:52 +0300 Subject: [Distutils] documentation recommendations for Python 3 installs In-Reply-To: References: Message-ID: <20120427221452.GA31396@fridge.pov.lt> On Wed, Apr 25, 2012 at 12:48:10PM -0700, Chris Jerdonek wrote: > I'd like advice on what instructions to provide to users (if any) to > avoid what might be a common user error. > > I maintain a project written in Python 2, and I recently added support > for Python 3 via 2to3 and the installation process. Recently, a > Python 3 user got the source code, manually installed it by running > "setup.py build" and "setup.py install," and then proceeded to test it > by firing up the IDE and importing the project. They then got a > syntax error because they were still in the project directory and so > wound up importing the original Python 2 code rather than the Python 3 > version in site-packages. This is probably an argument for the ./src/ intermediate directory in your source tree layout. Also, it's an argument for porting to Python 3 by avoiding 2to3 and instead using the common subset of Python 2.x and 3.y for reasonable values of x (say, >= 6). > What is the recommended workflow or instructions to include in a > project README to prevent new users from running into this kind of > error? Marius Gedminas -- Microsoft has performed an illegal operation and will be shut down. -- Judge Jackson -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Digital signature URL: From regebro at gmail.com Sat Apr 28 06:59:56 2012 From: regebro at gmail.com (Lennart Regebro) Date: Sat, 28 Apr 2012 06:59:56 +0200 Subject: [Distutils] documentation recommendations for Python 3 installs In-Reply-To: References: Message-ID: On Wed, Apr 25, 2012 at 21:48, Chris Jerdonek wrote: > What is the recommended workflow or instructions to include in a > project README to prevent new users from running into this kind of > error? The instructions are to explain to the user that Python 3 support is via 2to3, and that this conversion is done at install time, so that all development is done in Python 2. //Lennart From anthony.hw.kong at gmail.com Sat Apr 28 10:55:26 2012 From: anthony.hw.kong at gmail.com (Anthony Kong) Date: Sat, 28 Apr 2012 18:55:26 +1000 Subject: [Distutils] Problem installing distribute in python 3.3 Message-ID: Hi, all, I have built python3.3 from source. I want to use pip which has a dependency on setuptools. This's why I am here. I have followed these steps here ( http://packages.python.org/distribute/index.html) to initiate the distribute installation: curl -O http://python-distribute.org/distribute_setup.py python3 distribute_setup.py Up to this point I got a lot byte-compiling exceptions. Here is a partial listing: ==================================== byte-compiling /Users/antkong/local/lib/python3.3/site-packages/setuptools/command/alias.py to alias.cpython-33.pyc File "/Users/antkong/local/lib/python3.3/site-packages/setuptools/command/alias.py", line 12 if arg.split()<>[arg]: ^ SyntaxError: invalid syntax byte-compiling /Users/antkong/local/lib/python3.3/site-packages/setuptools/command/bdist_egg.py to bdist_egg.cpython-33.pyc File "/Users/antkong/local/lib/python3.3/site-packages/setuptools/command/bdist_egg.py", line 410 if safe is None or bool(safe)<>flag: ^ SyntaxError: invalid syntax ==================================== It looks like distribute is shipping python 2 code. Any suggestion or idea? Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at zope.com Sat Apr 28 21:18:02 2012 From: jim at zope.com (Jim Fulton) Date: Sat, 28 Apr 2012 15:18:02 -0400 Subject: [Distutils] Dropping support for zipped installes in buildout. Message-ID: Buildout supports installing zipped eggs because setuptools does. Most people find zipped eggs a pain and complain that buildout should always unzip. As part of my work to simplify buildout's implementation, I'm dropping support for setuptools. This isn't because I don't appreciate setuptools. Setuptools made Python packaging really work. Unfortunately, setuptools doesn't support Python 3 and life is too short to try to support both distribute and setuptools. Distribute doesn't support the zip_safe flag, so buildout can't reliably support installing zipped eggs from source distruibution. Given that and that (almost) no one likes zipped eggs anyway, I'm just going to install everything unzipped. Objections entertaining. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://www.dublinstore.com/ From regebro at gmail.com Sat Apr 28 21:26:35 2012 From: regebro at gmail.com (Lennart Regebro) Date: Sat, 28 Apr 2012 21:26:35 +0200 Subject: [Distutils] Dropping support for zipped installes in buildout. In-Reply-To: References: Message-ID: On Sat, Apr 28, 2012 at 21:18, Jim Fulton wrote: > Buildout supports installing zipped eggs because setuptools does. > > Most people find zipped eggs a pain and complain that buildout should > always unzip. > > As part of my work to simplify buildout's implementation, I'm dropping > support for setuptools. This isn't because I don't appreciate > setuptools. ?Setuptools made Python packaging really > work. Unfortunately, setuptools doesn't support Python 3 and life is > too short to try to support both distribute and setuptools. +1 //Lennart From sdouche at gmail.com Sat Apr 28 21:31:39 2012 From: sdouche at gmail.com (Sebastien Douche) Date: Sat, 28 Apr 2012 21:31:39 +0200 Subject: [Distutils] Dropping support for zipped installes in buildout. In-Reply-To: References: Message-ID: On Sat, Apr 28, 2012 at 21:18, Jim Fulton wrote: > Distribute doesn't support the zip_safe flag, so buildout can't > reliably support installing zipped eggs from source distruibution. > Given that and that (almost) no one likes zipped eggs anyway, I'm just > going to install everything unzipped. We use the option "unzip = true" from the beginning thus +1 :). -- Sebastien Douche Twitter: @sdouche / G+: +sdouche From m.van.rees at zestsoftware.nl Sat Apr 28 21:34:30 2012 From: m.van.rees at zestsoftware.nl (Maurits van Rees) Date: Sat, 28 Apr 2012 21:34:30 +0200 Subject: [Distutils] hg ChangeLog... In-Reply-To: References: Message-ID: Op 27-04-12 02:49, Rob Healey schreef: > Greetings: > > I am new to using mercurial, and I would like to know if there is > something equivalent to subversion's ChangeLog, which shows me what > changes have been done and its revision number and who did the > changes... > > Is it possible to do the same with mercurial and if yes, what command > would I run??? That would be 'hg log'. Also, that would be a question to ask on a mercurial mailing list, not on the Python distutils list. Kind regards, -- Maurits van Rees: http://maurits.vanrees.org/ Zest Software: http://zestsoftware.nl From cedric.dsm at tiolive.com Sun Apr 29 13:22:07 2012 From: cedric.dsm at tiolive.com (=?iso-8859-1?Q?C=E9dric_de_Saint_Martin?=) Date: Sun, 29 Apr 2012 13:22:07 +0200 Subject: [Distutils] Dropping support for zipped installes in buildout. In-Reply-To: References: Message-ID: <86D8E57C-0E52-4485-A541-955CFD2BA649@tiolive.com> On 28 avr. 2012, at 21:31, Sebastien Douche wrote: > On Sat, Apr 28, 2012 at 21:18, Jim Fulton wrote: >> Distribute doesn't support the zip_safe flag, so buildout can't >> reliably support installing zipped eggs from source distruibution. >> Given that and that (almost) no one likes zipped eggs anyway, I'm just >> going to install everything unzipped. > > We use the option "unzip = true" from the beginning thus +1 :). Same for us, all our profiles define it. So no objection! > > > -- > Sebastien Douche > Twitter: @sdouche / G+: +sdouche > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG at python.org > http://mail.python.org/mailman/listinfo/distutils-sig --------------------- C?dric de Saint Martin, SlapOS Node Lead Developer @ ViFiB http://www.slapos.org