[cig-commits] r5233 - in cs/merlin/trunk: . merlin/command merlin.egg-info

leif at geodynamics.org leif at geodynamics.org
Fri Nov 10 00:09:01 PST 2006


Author: leif
Date: 2006-11-10 00:09:01 -0800 (Fri, 10 Nov 2006)
New Revision: 5233

Added:
   cs/merlin/trunk/merlin/command/sdist_egg.py
Modified:
   cs/merlin/trunk/PKG-INFO
   cs/merlin/trunk/merlin.egg-info/SOURCES.txt
   cs/merlin/trunk/merlin.egg-info/entry_points.txt
   cs/merlin/trunk/merlin/command/__init__.py
Log:
Added an 'sdist_egg' command for creating source-only .egg packages
(i.e., packages which don't contain byte-compiled .pyc files).  Unlike
normal eggs, source eggs are Python-version-independent... after all,
isn't that supposed to be one of the luxuries of an interpreted language --
independence from binary formats?  (!?)  (Unlike the source packages
created by 'sdist', a source egg is a directly importable ZIP file:
it can be put on PYTHONPATH.)


Modified: cs/merlin/trunk/PKG-INFO
===================================================================
--- cs/merlin/trunk/PKG-INFO	2006-11-10 03:10:57 UTC (rev 5232)
+++ cs/merlin/trunk/PKG-INFO	2006-11-10 08:09:01 UTC (rev 5233)
@@ -1,89 +1,10 @@
 Metadata-Version: 1.0
-Name: setuptools
-Version: 0.6c3
-Summary: Download, build, install, upgrade, and uninstall Python packages -- easily!
-Home-page: http://peak.telecommunity.com/DevCenter/setuptools
-Author: Phillip J. Eby
-Author-email: peak at eby-sarna.com
+Name: merlin
+Version: 1.0b1
+Summary: A custom version of Phillip J. Eby's setuptools.
+Home-page: http://www.geodynamics.org/cig/software/packages/pythia/
+Author: Leif Strand
+Author-email: leif at geodynamics.org
 License: PSF or ZPL
-Description: ``setuptools`` is a collection of enhancements to the Python ``distutils``
-        (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum
-        of Python 2.4) that allow you to more easily build and distribute Python
-        packages, especially ones that have dependencies on other packages.
-        
-        Packages built and distributed using ``setuptools`` look to the user like
-        ordinary Python packages based on the ``distutils``.  Your users don't need to
-        install or even know about setuptools in order to use them, and you don't
-        have to include the entire setuptools package in your distributions.  By
-        including just a single `bootstrap module`_ (an 8K .py file), your package will
-        automatically download and install ``setuptools`` if the user is building your
-        package from source and doesn't have a suitable version already installed.
-        
-        .. _bootstrap module: http://peak.telecommunity.com/dist/ez_setup.py
-        
-        Feature Highlights:
-        
-        * Automatically find/download/install/upgrade dependencies at build time using
-        the `EasyInstall tool <http://peak.telecommunity.com/DevCenter/EasyInstall>`_,
-        which supports downloading via HTTP, FTP, Subversion, and SourceForge, and
-        automatically scans web pages linked from PyPI to find download links.  (It's
-        the closest thing to CPAN currently available for Python.)
-        
-        * Create `Python Eggs <http://peak.telecommunity.com/DevCenter/PythonEggs>`_ -
-        a single-file importable distribution format
-        
-        * Include data files inside your package directories, where your code can
-        actually use them.  (Python 2.4 distutils also supports this feature, but
-        setuptools provides the feature for Python 2.3 packages also, and supports
-        accessing data files in zipped packages too.)
-        
-        * Automatically include all packages in your source tree, without listing them
-        individually in setup.py
-        
-        * Automatically include all relevant files in your source distributions,
-        without needing to create a ``MANIFEST.in`` file, and without having to force
-        regeneration of the ``MANIFEST`` file when your source tree changes.
-        
-        * Automatically generate wrapper scripts or Windows (console and GUI) .exe
-        files for any number of "main" functions in your project.  (Note: this is not
-        a py2exe replacement; the .exe files rely on the local Python installation.)
-        
-        * Transparent Pyrex support, so that your setup.py can list ``.pyx`` files and
-        still work even when the end-user doesn't have Pyrex installed (as long as
-        you include the Pyrex-generated C in your source distribution)
-        
-        * Command aliases - create project-specific, per-user, or site-wide shortcut
-        names for commonly used commands and options
-        
-        * PyPI upload support - upload your source distributions and eggs to PyPI
-        
-        * Deploy your project in "development mode", such that it's available on
-        ``sys.path``, yet can still be edited directly from its source checkout.
-        
-        * Easily extend the distutils with new commands or ``setup()`` arguments, and
-        distribute/reuse your extensions for multiple projects, without copying code.
-        
-        * Create extensible applications and frameworks that automatically discover
-        extensions, using simple "entry points" declared in a project's setup script.
-        
-        In addition to the PyPI downloads, the development version of ``setuptools``
-        is available from the `Python SVN sandbox`_, and in-development versions of the
-        `0.6 branch`_ are available as well.
-        
-        .. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06
-        
-        .. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev
-        
-        
-Keywords: CPAN PyPI distutils eggs package management
+Description: UNKNOWN
 Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: Python Software Foundation License
-Classifier: License :: OSI Approved :: Zope Public License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: System :: Archiving :: Packaging
-Classifier: Topic :: System :: Systems Administration
-Classifier: Topic :: Utilities

Modified: cs/merlin/trunk/merlin/command/__init__.py
===================================================================
--- cs/merlin/trunk/merlin/command/__init__.py	2006-11-10 03:10:57 UTC (rev 5232)
+++ cs/merlin/trunk/merlin/command/__init__.py	2006-11-10 08:09:01 UTC (rev 5233)
@@ -3,7 +3,7 @@
     'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
     'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts',
     'register',
-    'install_deps',
+    'install_deps', 'sdist_egg',
 ]
 
 import sys

Added: cs/merlin/trunk/merlin/command/sdist_egg.py
===================================================================
--- cs/merlin/trunk/merlin/command/sdist_egg.py	2006-11-10 03:10:57 UTC (rev 5232)
+++ cs/merlin/trunk/merlin/command/sdist_egg.py	2006-11-10 08:09:01 UTC (rev 5233)
@@ -0,0 +1,50 @@
+"""merlin.command.sdist_egg
+
+Build Python-version-independent source .egg distributions"""
+
+
+from merlin.command.bdist_egg import bdist_egg
+from merlin import get_build_platform, to_filename
+
+
+class sdist_egg(bdist_egg):
+
+
+    def finalize_options(self):
+        import os
+        
+        ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
+        self.egg_info = ei_cmd.egg_info
+
+        if self.bdist_dir is None:
+            bdist_base = self.get_finalized_command('bdist').bdist_base
+            self.bdist_dir = os.path.join(bdist_base, 'egg')
+
+        if self.plat_name is None:
+            self.plat_name = get_build_platform()
+
+        self.set_undefined_options('bdist',('dist_dir', 'dist_dir'))
+
+        if self.egg_output is None:
+
+            # Compute filename of the output egg
+            filename = "%s-%s" % (
+                to_filename(ei_cmd.egg_name), to_filename(ei_cmd.egg_version)
+                )
+            platform = self.distribution.has_ext_modules() and self.plat_name
+            if platform:
+                filename += '-'+self.platform
+
+            self.egg_output = os.path.join(self.dist_dir, filename+'.egg')
+
+        return
+
+
+    def call_command(self,cmdname,**kw):
+        kw.setdefault('compile', False)
+        kw.setdefault('optimize', False)
+        return bdist_egg.call_command(self, cmdname, **kw)
+
+
+
+# end of file

Modified: cs/merlin/trunk/merlin.egg-info/SOURCES.txt
===================================================================
--- cs/merlin/trunk/merlin.egg-info/SOURCES.txt	2006-11-10 03:10:57 UTC (rev 5232)
+++ cs/merlin/trunk/merlin.egg-info/SOURCES.txt	2006-11-10 08:09:01 UTC (rev 5233)
@@ -47,6 +47,7 @@
 merlin/command/rotate.py
 merlin/command/saveopts.py
 merlin/command/sdist.py
+merlin/command/sdist_egg.py
 merlin/command/setopt.py
 merlin/command/test.py
 merlin/command/upload.py

Modified: cs/merlin/trunk/merlin.egg-info/entry_points.txt
===================================================================
--- cs/merlin/trunk/merlin.egg-info/entry_points.txt	2006-11-10 03:10:57 UTC (rev 5232)
+++ cs/merlin/trunk/merlin.egg-info/entry_points.txt	2006-11-10 08:09:01 UTC (rev 5233)
@@ -41,6 +41,7 @@
 alias = merlin.command.alias:alias
 easy_install = merlin.command.easy_install:easy_install
 install_scripts = merlin.command.install_scripts:install_scripts
+sdist_egg = merlin.command.sdist_egg:sdist_egg
 bdist_egg = merlin.command.bdist_egg:bdist_egg
 install = merlin.command.install:install
 test = merlin.command.test:test



More information about the cig-commits mailing list