Re: [Distutils] local development scenarios
At 06:22 PM 12/10/2005 -0800, tgreenwood wrote:
Phillip - Perhaps this is another obvious rtfm question, but here goes. How can I add custom actions to the build? I'm used to writing ant scripts to create build targets and chain dependencies, etc.
In the python/egg world, I'd like to do the same thing. For instance, I'd like to define a target that would: ~ - generate the egg ala bdist_egg ~ - generate my restructured text documentation (vim.vst)...not sure how to call this from vim yet, but I'm sure it's possible ~ - run my unittest suite ~ - deploy resulting egg to my ftp site
The 'alias' command lets you define new "setup.py" commands as a combination of existing commands: http://peak.telecommunity.com/DevCenter/setuptools#alias-define-shortcuts-fo... The 'upload' command sends eggs and/or source distributions to PyPI: http://peak.telecommunity.com/DevCenter/setuptools#upload-upload-source-and-... And you can extend setuptools with new commands via entry points, although usually it's best to package these in a separate egg from the project you will use them on: http://peak.telecommunity.com/DevCenter/setuptools#creating-distutils-extens... http://peak.telecommunity.com/DevCenter/setuptools#adding-commands
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm finding that I'm coding online and offline. When I'm offline, I would really like to use the svn:externals definition for ez_setup. It seems that the best way to do this would be to create a 'peak' project just for the ez_setup files. Then, when I'm online, I can sync 'peak' and get the latest ez_setup files. When I'm offline, I could reference the 'peak' project in my other python projects that use setuptools. I've tried this, but so far, I keep getting just a blank directory when my projects reference 'peak'. REPRO: $ cd temp $ mkdir peak $ svn import peak file:///home/me/svn/peak -m 'local peak' $ cd ~/active $ svn co file:///home/me/svn/peak $ cd peak $ svn propedit svn:externals . |> ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup $ svn update $ ls |> ez_setup $ ls ez_setup |> __init__.py README.txt $ cd ~/active $ cd SomeExistingProjectInSVN $ svn propedit svn:externals . |> # ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup |> ez_setup file:///home/me/svn/peak $ svn update |> Fetching external item into 'ez_setup' |> External at revision 21. |> |> At revision 21. $ ls |> ez_setup $ ls ez_setup |> total 0 ERROR: I expect to see these files: |> __init__.py README.txt - -Todd -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDoGU0z6uXX4lQc/URAg2QAJ9EQsR/WHYhPyebWT2Dx7ikJWhUxQCfXwAm XHyCKVMpQNApSJOf1Qihbaw= =VBoR -----END PGP SIGNATURE-----
At 10:32 AM 12/14/2005 -0800, Todd Greenwood-Geer wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm finding that I'm coding online and offline. When I'm offline, I would really like to use the svn:externals definition for ez_setup. It seems that the best way to do this would be to create a 'peak' project just for the ez_setup files. Then, when I'm online, I can sync 'peak' and get the latest ez_setup files. When I'm offline, I could reference the 'peak' project in my other python projects that use setuptools. I've tried this, but so far, I keep getting just a blank directory when my projects reference 'peak'.
Subversion doesn't chain externals, so there isn't a good solution for what you're trying to do. You should probably just use ez_setup.py instead of ez_setup/__init__.py. The main advantage to using svn:externals is that it gets you (and anyone who checks out your project) an updated ez_setup/__init__.py just by running svn update.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok. I'll fall back to copying the file in the offline scenario. Thanks. Phillip J. Eby wrote: | At 10:32 AM 12/14/2005 -0800, Todd Greenwood-Geer wrote: |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> I'm finding that I'm coding online and offline. When I'm offline, I |> would really like to use the svn:externals definition for ez_setup. It |> seems that the best way to do this would be to create a 'peak' project |> just for the ez_setup files. Then, when I'm online, I can sync 'peak' |> and get the latest ez_setup files. When I'm offline, I could reference |> the 'peak' project in my other python projects that use setuptools. I've |> tried this, but so far, I keep getting just a blank directory when my |> projects reference 'peak'. | | Subversion doesn't chain externals, so there isn't a good solution for what | you're trying to do. You should probably just use ez_setup.py instead of | ez_setup/__init__.py. | | The main advantage to using svn:externals is that it gets you (and anyone | who checks out your project) an updated ez_setup/__init__.py just by | running svn update. | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDoJjuz6uXX4lQc/URAl8+AKC8BX0GjYNHzOQH8RkWNqBw7xDIQwCfU3YD LjgdJfneCmzOumzc4HuhNDU= =1wd7 -----END PGP SIGNATURE-----
participants (2)
-
Phillip J. Eby
-
Todd Greenwood-Geer