mastbaum avatar mastbaum committed c030050

add wrapper for bzip2

Comments (0)

Files changed (1)

+try:
+    from shrinkwrap.install import ShrinkwrapInstall
+except ImportError:
+    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
+    from shrinkwrap.install import ShrinkwrapInstall
+import os
+from setuptools import setup
+
+
+version = '1.0.6'
+source_url = 'http://www.bzip.org/%(version)s/bzip2-%(version)s.tar.gz' % {'version': version}
+
+
+def installer(self):
+    # Get source and unpack to $VIRTUAL_ENV/src
+    self.download_and_unpack_tarball(source_url, to_src_dir=True)
+
+    # Compile in place
+    os.chdir(self.src_dir)
+    bzip2_dir = 'bzip2-' + version
+    os.chdir(bzip2_dir)
+    self.make(extra_opts=['install', 'PREFIX=%s' % self.virtualenv])
+
+setup(
+    name='bzip2',
+    version=version,
+    author='Andy Mastbaum',
+    author_email='mastbaum@hep.upenn.edu',
+    shrinkwrap_installer=installer,
+    cmdclass={'install': ShrinkwrapInstall},
+)
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.