Commits

Doug Hellmann committed efaab4b

convert from make to paver 1.0

Comments (0)

Files changed (4)

 include README.html
+include setup.py
+include paver-minilib.zip
+include pavement.py

Makefile

-#
-# $Id$
-#
-
-SVNHOME=$(shell svn info | grep "^URL" | cut -f2- -d:)
-PROJECT=virtualenvwrapper
-VERSION=$(shell basename $(SVNHOME))
-RELEASE=$(PROJECT)-$(VERSION)
-
-info:
-	SVNHOME=$(SVNHOME)
-	PROJECT=$(PROJECT)
-	VERSION=$(VERSION)
-	RELEASE=$(RELEASE)
-
-package:
-	rm -f setup.py
-	$(MAKE) setup.py README.html
-	python setup.py sdist --force-manifest
-	mv dist/*.gz ~/Desktop/
-
-register: setup.py
-	python setup.py register
-
-README.html: README
-	rst2html.py $< $@
-
-%: %.in
-	cat $< | sed 's/VERSION/$(VERSION)/g' > $@
-	chmod -w $@
-
-
-dist:
-	mkdir -p dist
-
-#
-# Dump a version that does not include .svn directories.
-#
-export:
-	rm -rf dist/$(RELEASE)
-	(cd dist; svn export $(SVNHOME) $(RELEASE); rm -f $(RELEASE)/Makefile)
+#!/usr/bin/env python
+# encoding: utf-8
+#
+# Copyright (c) 2008 Doug Hellmann All rights reserved.
+#
+"""
+TODO
+
+ - make sure all of the files from the manifests are included
+ 
+"""
+
+__version__ = "$Id$"
+
+# Standard library
+import copy
+import os
+
+# Third-party
+
+# Set up Paver
+import paver
+import paver.misctasks
+from paver.path import path
+from paver.easy import *
+import paver.setuputils
+paver.setuputils.install_distutils_tasks()
+
+# What project are we building?
+PROJECT = 'virtualenvwrapper'
+
+# What version is this? (take from path in svn tree)
+VERSION = path(os.getcwd()).name
+os.environ['VERSION'] = VERSION
+
+# Read the long description to give to setup
+README = path('README').text()
+
+# Scan the input for package information
+# to grab any data files (text, images, etc.) 
+# associated with sub-packages.
+# PACKAGE_DATA = paver.setuputils.find_package_data(PROJECT, 
+#                                                   package=PROJECT,
+#                                                   only_in_packages=True,
+#                                                   )
+
+options(
+    setup=Bunch(
+        name = PROJECT,
+        version = VERSION,
+        
+        description = 'Enhancements to virtualenv',
+        long_description = README,
+
+        author = 'Doug Hellmann',
+        author_email = 'doug.hellmann@gmail.com',
+
+        url = 'http://www.doughellmann.com/projects/virtualenvwrapper/',
+        download_url = 'http://www.doughellmann.com/downloads/%s-%s.tar.gz' % \
+                        (PROJECT, VERSION),
+
+        classifiers = [ 'Development Status :: 5 - Production/Stable',
+                        'License :: OSI Approved :: BSD License',
+                        'Programming Language :: Python',
+                        'Intended Audience :: Developers',
+                        'Environment :: Console',
+                        ],
+
+        platforms = ('Any',),
+
+        scripts = ['virtualenvwrapper_bashrc', 
+                   ],
+
+        provides=['virtualenvwrapper',
+                  ],
+        requires=['virtualenv'],
+
+        data_files=[('docs', ['README.html']),
+                    ],
+
+        # It seems wrong to have to list recursive packages explicitly.
+        # packages = sorted(PACKAGE_DATA.keys()),
+        # package_data=PACKAGE_DATA,
+
+        zip_safe=False,
+
+        ),
+    
+    packaging = Bunch(
+        outdir='~/Desktop',
+    ),
+    
+)
+
+def remake_directories(*dirnames):
+    """Remove the directories and recreate them.
+    """
+    for d in dirnames:
+        d = path(d)
+        if d.exists():
+            d.rmtree()
+        d.mkdir()
+    return
+
+@task
+@needs(['html', 'generate_setup', 'minilib', 
+        'setuptools.command.sdist'
+        ])
+def sdist():
+    """Create a source distribution.
+    """
+    # Move the output file to the desktop
+    dist_files = path('dist').glob('*.tar.gz')
+    dest_dir = path(options.packaging.outdir).expanduser()
+    for f in dist_files:
+        f.move(dest_dir)
+    return
+
+@task
+def html():
+    # FIXME - Switch to sphinx?
+    outfile = path('README.html')
+    outfile.unlink()
+    sh('rst2html.py README README.html')
+    return

setup.py.in

-#!/usr/bin/env python
-#
-# $Id: setup.py 120 2003-04-23 12:18:54Z doughellmann $
-#
-# Time-stamp: <06/12/31 12:03:26 dhellmann>
-#
-# Copyright 2001 Doug Hellmann.
-#
-#
-#                         All Rights Reserved
-#
-# Permission to use, copy, modify, and distribute this software and
-# its documentation for any purpose and without fee is hereby
-# granted, provided that the above copyright notice appear in all
-# copies and that both that copyright notice and this permission
-# notice appear in supporting documentation, and that the name of Doug
-# Hellmann not be used in advertising or publicity pertaining to
-# distribution of the software without specific, written prior
-# permission.
-#
-# DOUG HELLMANN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-# NO EVENT SHALL DOUG HELLMANN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-"""Distutils setup file for Proctor
-
-"""
-
-#
-# Import system modules
-#
-from distutils.core import setup
-import os
-
-#
-# Import Local modules
-#
-
-#
-# Module
-#
-
-long_description = open('README', 'rt').read()
-
-setup (
-    name = 'virtualenvwrapper',
-    version = 'VERSION',
-
-    description = 'Enhancements to virtualenv',
-    long_description = long_description,
-
-    author = 'Doug Hellmann',
-    author_email = 'doug.hellmann@gmail.com',
-
-    url = 'http://www.doughellmann.com/projects/virtualenvwrapper/',
-    download_url = 'http://www.doughellmann.com/downloads/virtualenvwrapper-VERSION.tar.gz',
-
-    classifiers = [ 'Development Status :: 5 - Production/Stable',
-                    'License :: OSI Approved :: BSD License',
-                    'Programming Language :: Python',
-                    'Intended Audience :: Developers',
-                    'Environment :: Console',
-                    ],
-
-    platforms = ('Any',),
-
-    scripts = ['virtualenvwrapper_bashrc', 
-               ],
-
-    provides=['virtualenvwrapper',
-              ],
-    requires=['virtualenv'],
-    
-    data_files=[('docs', ['README.html']),
-                ],
-    )
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.