Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Packaged.

  • Loading branch information...
commit 80a2ae3610155a4e2efea9618cc16914c0dac915 1 parent 0fded18
Alexei Boronine authored
Showing with 51 additions and 9 deletions.
  1. +6 −0 .gitignore
  2. +9 −9 pypyenv → pypyenv.py
  3. +36 −0 setup.py
6 .gitignore
View
@@ -0,0 +1,6 @@
+*.pyc
+build
+dist
+pypyenv.egg-info
+pypyenv
+
18 pypyenv → pypyenv.py
View
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
import os
import sys
import urllib2
@@ -9,7 +7,9 @@
import getopt
import platform
-base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+__version__ = "0.1"
+
+base = sys.prefix
srcdir = "src"
bindir = "bin"
binpypy = os.path.join(bindir, "pypy")
@@ -21,7 +21,7 @@
def out(s):
print " * " + s
-def install():
+def install(download):
os.chdir(base)
# Clean up if anything was left over
uninstall()
@@ -84,11 +84,11 @@ def uninstall():
def confirm_deletion(tree):
return raw_input("Delete ENV/%s? [y/N] " % tree) in yes
-help_message = """pypyenv install - installs PyPy in this virtualenv
-pypyenv uninstall - uninstalls PyPy from this virtualenv
- --nojit - Install non-JIT version."""
+help_message = """ pypyenv install - installs PyPy in this virtualenv
+ pypyenv uninstall - uninstalls PyPy from this virtualenv
+ --nojit - Install non-JIT version."""
-if __name__ == "__main__":
+def main():
if version != "2.5":
if not raw_input("PyPy implements Python 2.5, you are using a " \
"different version, continue? [y/N] ") in yes:
@@ -135,7 +135,7 @@ def confirm_deletion(tree):
download = "http://pypy.org/download/pypy-1.3-osx-nojit.tar.bz2"
if args[0] == "install":
- install()
+ install(download)
elif args[0] == "uninstall":
uninstall()
else:
36 setup.py
View
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Use setuptools if we can
+try:
+ from setuptools.core import setup
+except ImportError:
+ from distutils.core import setup
+from pypyenv import __version__
+
+setup(
+ name='pypyenv',
+ version=__version__,
+ description='Install PyPy in virtualenv',
+ long_description="Install PyPy as an optional Python 2.5 interpretor "\
+ "in a virtualenv on Linux and OS X systems.",
+ author="Alexei Boronine",
+ license="MIT",
+ author_email="alexei.boronine@gmail.com",
+ url="http://github.com/alexeiboronine/pypyenv",
+ download_url="http://github.com/alexeiboronine/pypyenv/downloads",
+ keywords="pypy virtualenv",
+ classifiers=[
+ "Development Status :: 3 - Alpha",
+ "Intended Audience :: Developers",
+ "Intended Audience :: System Administrators",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Topic :: Software Development"
+ ],
+ py_modules=["pypyenv"],
+ entry_points = {
+ 'console_scripts': [
+ 'pypyenv = pypyenv:main'
+ ]
+ }
+)
Please sign in to comment.
Something went wrong with that request. Please try again.