Skip to content

Commit

Permalink
Platform switch in setup.py
Browse files Browse the repository at this point in the history
-----------------------------------
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.
  • Loading branch information
moschlar committed Jun 1, 2011
1 parent 363e36b commit dc35b68
Showing 1 changed file with 55 additions and 26 deletions.
81 changes: 55 additions & 26 deletions setup.py
@@ -1,6 +1,9 @@
import os import os
import sys
from distutils.core import setup from distutils.core import setup
import py2exe
if sys.platform == 'win32':
import py2exe


# Utility function to read the README file. # Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level # Used for the long_description. It's nice, because now 1) we have a top level
Expand All @@ -9,28 +12,54 @@
def read(fname): def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read() return open(os.path.join(os.path.dirname(__file__), fname)).read()


setup( if sys.platform == 'win32':
name = "reposado", setup(
version = "git", name = "reposado",
author = "Greg Neagle", version = "git",
author_email = "reposado@googlegroups.com", author = "Greg Neagle",
maintainer = "Brent B", author_email = "reposado@googlegroups.com",
maintainer_email = "brent.bb+py@gmail.com", maintainer = "Brent B",
description = ("Host Apple Software Updates on the hardware and OS of your choice."), maintainer_email = "brent.bb+py@gmail.com",
license = "BSD", description = ("Host Apple Software Updates on the hardware and OS of your choice."),
keywords = "apple software update repository", license = "BSD",
url = "https://github.com/wdas/reposado", keywords = "apple software update repository",
packages=['reposadolib'], url = "https://github.com/wdas/reposado",
package_dir={'reposadolib': 'code/reposadolib'}, packages=['reposadolib'],
scripts=["code/repo_sync","code/repoutil"], package_dir={'reposadolib': 'code/reposadolib'},
long_description=read('README.md'), scripts=["code/repo_sync","code/repoutil"],
classifiers=[ long_description=read('README.md'),
"Intended Audience :: System Administrators", classifiers=[
"Development Status :: 1 - Alpha", "Intended Audience :: System Administrators",
"Topic :: Utilities", "Development Status :: 1 - Alpha",
"License :: OSI Approved :: BSD License", "Topic :: Utilities",
"Topic :: System :: Archiving :: Mirroring", "License :: OSI Approved :: BSD License",
"Topic :: System :: Installation/Setup", "Topic :: System :: Archiving :: Mirroring",
], "Topic :: System :: Installation/Setup",
console=["code/repo_sync","code/repoutil"], ],
) 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",
],
)

0 comments on commit dc35b68

Please sign in to comment.