Commits

Doug Hellmann committed 3a5a250

create a simple python package and include the documentation in it so it is installed by default

Comments (0)

Files changed (5)

 setup.py
 trace.txt
 docs
+*.pyc
 
 syntax: re
 .DS_Store
-include README.html
 include setup.py
 include paver-minilib.zip
 include pavement.py
 include tests/*
-recursive-include docs *.html *.txt *.css *.js *.png
+recursive-include virtualenvwrapper *.html *.txt *.css *.js *.png
 recursive-include docsource *.rst

docsource/history.rst

 Release History
 ===============
 
+1.17
+
+  - Added documentation updates provided by Steve Steiner.
+
 1.16
 
   - Merged in changes to ``cdvirtualenv`` from wam and added tests and docs.
 # 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,
-#                                                   )
+PACKAGE_DATA = paver.setuputils.find_package_data(PROJECT, 
+                                              package=PROJECT,
+                                              only_in_packages=False,
+                                              )
 
 options(
     setup=Bunch(
         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,
+        
+        packages = sorted(PACKAGE_DATA.keys()),
+        package_data = PACKAGE_DATA,
 
         zip_safe=False,
 
     return
 
 @task
-@needs(['html', 'readme_html', 'generate_setup', 'minilib', 
-        'setuptools.command.sdist'
+@needs('paver.doctools.html')
+def html(options):
+    destdir = path(PROJECT) / 'docs'
+    destdir.rmtree()
+    builtdocs = path(options.builddir) / "html"
+    builtdocs.move(destdir)
+    return
+
+@task
+@needs(['html',
+        'generate_setup', 'minilib', 
+        'setuptools.command.sdist',
         ])
-def sdist():
+def sdist(options):
     """Create a source distribution.
     """
     pass
-
-@task
-def readme_html():
-    # FIXME - Switch to sphinx?
-    outfile = path('README.html')
-    outfile.unlink()
-    sh('rst2html.py %s README.html' % README_FILE)
-    return
-
+    
 @task
 def test():
     sh('bash ./tests/test.sh')
     sh('SHUNIT_PARENT=./tests/test.sh zsh -o shwordsplit ./tests/test.sh')
+    return

virtualenvwrapper/__init__.py

+"""virtualenvwrapper module
+"""
+
+if __name__ == '__main__':
+    import os
+    import webbrowser
+    docs_root = os.path.join(os.path.dirname(__file__), 'docs', 'index.html')
+    webbrowser.open_new('file://' + docs_root)
+else:
+    import warnings
+    warnings.warn('Use virtualenvwrapper_bashrc to set up your shell environment.')
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.