summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2011-02-25 22:38:17 +0000
committerRobert Brewer <fumanchu@aminus.org>2011-02-25 22:38:17 +0000
commitfd8b1e2a2662d965f05a14c2c72701decd81697c (patch)
treef6b7f89ffb181bc940c7d9b3541f01f25b49699d /setup.py
parent5450bb603f7e0cf91d216225d3fa3f524710bcd6 (diff)
downloadcherrypy-git-trunk.tar.gz
Bringing python3 back into trunk with its own py3 folder; what was in trunk goes in the py2 folder, and we can use a single setup.py to install either, depending on the version of Python that runs setup.py install.trunk
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 3425dd8e..fbf678ab 100644
--- a/setup.py
+++ b/setup.py
@@ -14,9 +14,6 @@ except ImportError:
from distutils.command.install import INSTALL_SCHEMES
import sys
import os
-import shutil
-
-required_python_version = '2.3'
###############################################################################
# arguments for the setup command
@@ -33,6 +30,7 @@ classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 3",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
@@ -77,6 +75,17 @@ data_files=[
]
),
]
+if sys.version_info >= (3, 0):
+ required_python_version = '3.0'
+ setupdir = 'py3'
+else:
+ required_python_version = '2.3'
+ setupdir = 'py2'
+package_dir={'': setupdir}
+data_files = [(install_dir, ['%s/%s' % (setupdir, f) for f in files])
+ for install_dir, files in data_files]
+scripts = ["%s/cherrypy/cherryd" % setupdir]
+
###############################################################################
# end arguments for setup
###############################################################################
@@ -120,10 +129,11 @@ def main():
author_email=author_email,
url=url,
license=cp_license,
+ package_dir=package_dir,
packages=packages,
download_url=download_url,
data_files=data_files,
- scripts=[os.path.join("cherrypy", "cherryd")],
+ scripts=scripts,
)