Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Platform switch in setup.py

-----------------------------------
The script setup.py now check sys.platform to determine
whether we're runnning windows or *nix.

Tested on Windows and Linux, both worked fine.
commit dc35b680003e0e0ec145ae46912982770b1d8045 1 parent 363e36b
Moritz Schlarb moschlar authored
Showing with 55 additions and 26 deletions.
  1. +55 −26 setup.py
81 setup.py
View
@@ -1,6 +1,9 @@
import os
+import sys
from distutils.core import setup
-import py2exe
+
+if sys.platform == 'win32':
+ import py2exe
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
@@ -9,28 +12,54 @@
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-setup(
- name = "reposado",
- version = "git",
- author = "Greg Neagle",
- author_email = "reposado@googlegroups.com",
- maintainer = "Brent B",
- maintainer_email = "brent.bb+py@gmail.com",
- description = ("Host Apple Software Updates on the hardware and OS of your choice."),
- license = "BSD",
- keywords = "apple software update repository",
- url = "https://github.com/wdas/reposado",
- packages=['reposadolib'],
- package_dir={'reposadolib': 'code/reposadolib'},
- scripts=["code/repo_sync","code/repoutil"],
- long_description=read('README.md'),
- classifiers=[
- "Intended Audience :: System Administrators",
- "Development Status :: 1 - Alpha",
- "Topic :: Utilities",
- "License :: OSI Approved :: BSD License",
- "Topic :: System :: Archiving :: Mirroring",
- "Topic :: System :: Installation/Setup",
- ],
- console=["code/repo_sync","code/repoutil"],
-)
+if sys.platform == 'win32':
+ setup(
+ name = "reposado",
+ version = "git",
+ author = "Greg Neagle",
+ author_email = "reposado@googlegroups.com",
+ maintainer = "Brent B",
+ maintainer_email = "brent.bb+py@gmail.com",
+ description = ("Host Apple Software Updates on the hardware and OS of your choice."),
+ license = "BSD",
+ keywords = "apple software update repository",
+ url = "https://github.com/wdas/reposado",
+ packages=['reposadolib'],
+ package_dir={'reposadolib': 'code/reposadolib'},
+ scripts=["code/repo_sync","code/repoutil"],
+ long_description=read('README.md'),
+ classifiers=[
+ "Intended Audience :: System Administrators",
+ "Development Status :: 1 - Alpha",
+ "Topic :: Utilities",
+ "License :: OSI Approved :: BSD License",
+ "Topic :: System :: Archiving :: Mirroring",
+ "Topic :: System :: Installation/Setup",
+ ],
+ console=["code/repo_sync","code/repoutil"],
+ )
+else:
+ setup(
+ name = "reposado",
+ version = "git",
+ author = "Greg Neagle",
+ author_email = "reposado@googlegroups.com",
+ maintainer = "Brent B",
+ maintainer_email = "brent.bb+py@gmail.com",
+ description = ("Host Apple Software Updates on the hardware and OS of your choice."),
+ license = "BSD",
+ keywords = "apple software update repository",
+ url = "https://github.com/wdas/reposado",
+ packages=['reposadolib'],
+ package_dir={'reposadolib': 'code/reposadolib'},
+ scripts=["code/repo_sync","code/repoutil"],
+ long_description=read('README.md'),
+ classifiers=[
+ "Intended Audience :: System Administrators",
+ "Development Status :: 1 - Alpha",
+ "Topic :: Utilities",
+ "License :: OSI Approved :: BSD License",
+ "Topic :: System :: Archiving :: Mirroring",
+ "Topic :: System :: Installation/Setup",
+ ],
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.