os x
This commit is contained in:
parent
65584c30ca
commit
42f6fcb9a2
|
@ -65,6 +65,7 @@ class Configuration(RawConfigParser):
|
|||
set_option(section, "windows-dist-path", "dist/win/", False)
|
||||
set_option(section, "windows-icon-path", "", False)
|
||||
set_option(section, "lowercase-boolean-true", "yes", False)
|
||||
set_option(section, "osx-includes", "", False)
|
||||
section = "display"
|
||||
add_section(section)
|
||||
set_option(section, "dimensions", "480, 360", False)
|
||||
|
@ -295,10 +296,11 @@ class Configuration(RawConfigParser):
|
|||
exclude = []
|
||||
if self.has_option(section, option):
|
||||
exclude = self.get(section, option)
|
||||
exclude += [".git*", "README", "build/", "dist/",
|
||||
"setup.py", "MANIFEST", "PKG-INFO", "*.pyc",
|
||||
exclude += [".git*", "README", "build/", "dist/", "*.egg-info",
|
||||
"*.py", "MANIFEST*", "PKG-INFO", "*.pyc", "*.swp",
|
||||
self.get("setup", "changelog"),
|
||||
self.get("setup", "package-root")]
|
||||
self.get("setup", "package-root"),
|
||||
self.get("setup", "init-script")]
|
||||
for location in self.get("setup", "additional-packages"):
|
||||
exclude.append(location)
|
||||
self.set(section, option, exclude, False)
|
||||
|
@ -395,7 +397,7 @@ class TypeDeclarations(dict):
|
|||
|
||||
"setup": {"list": ["classifiers", "resource-search-path",
|
||||
"requirements", "data-exclude",
|
||||
"additional-packages"],
|
||||
"additional-packages", "osx-includes"],
|
||||
|
||||
"path": ["installation-dir", "changelog", "description-file",
|
||||
"main-object", "icon-path", "windows-dist-path",
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
from setuptools import setup, find_packages
|
||||
from Configuration import Configuration
|
||||
from Setup import Setup
|
||||
|
||||
class SetupOSX(Setup):
|
||||
|
||||
def __init__(self):
|
||||
Setup.__init__(self)
|
||||
|
||||
def setup(self):
|
||||
config = Configuration()
|
||||
setup_section = config.get_section("setup")
|
||||
version = setup_section["version"]
|
||||
name = self.translate_title()
|
||||
plist = dict(
|
||||
CFBundleIconFile=name,
|
||||
CFBundleName=name,
|
||||
CFBundleShortVersionString=version,
|
||||
CFBundleGetInfoString=' '.join([name, version]),
|
||||
CFBundleExecutable=name,
|
||||
CFBundleIdentifier='org.' + name.lower())
|
||||
setup(name=name,
|
||||
version=version,
|
||||
app=[dict(script=setup_section["init-script"], plist=plist)],
|
||||
setup_requires=["py2app"],
|
||||
options=dict(py2app=dict(arch="i386",)),
|
||||
data_files=setup_section["osx-includes"])
|
Loading…
Reference in New Issue