|
1 |
| -import os |
2 | 1 |
|
3 |
| -APP_NAME = "zanthor" |
4 |
| -DESCRIPTION = open("README.md").read() |
| 2 | +from setuptools import setup, find_packages |
5 | 3 |
|
6 |
| -METADATA = { |
7 |
| - "name": APP_NAME, |
8 |
| - "version": "1.2.3", |
9 |
| - "license": "GPL", |
10 |
| - "description": "Zanthor is a game where you play an evil robot castle which is powered by steam. @zanthorgame #python #pygame", |
11 |
| - "author": "zanthor.org", |
12 |
| - "author_email": "[email protected]", |
13 |
| - "url": "http://www.zanthor.org/", |
14 |
| - "classifiers": [ |
15 |
| - "Development Status :: 4 - Beta", |
16 |
| - "Intended Audience :: End Users/Desktop", |
17 |
| - "Intended Audience :: Information Technology", |
18 |
| - "License :: OSI Approved :: BSD License", |
19 |
| - "Operating System :: OS Independent", |
| 4 | +setup( |
| 5 | + name='zanthor', |
| 6 | + version="1.2.4a1", |
| 7 | + classifiers=[ |
| 8 | + 'Development Status :: 4 - Beta', |
| 9 | + 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', |
20 | 10 | "Programming Language :: Python :: 2",
|
21 | 11 | "Programming Language :: Python :: 2.7",
|
22 | 12 | "Programming Language :: Python :: 3",
|
|
33 | 23 | "Programming Language :: Python :: 3.10",
|
34 | 24 | "Programming Language :: Python :: 3.11",
|
35 | 25 | "Programming Language :: Python :: 3.12",
|
36 |
| - "Topic :: Software Development :: Libraries :: pygame", |
| 26 | + 'Topic :: Software Development :: Libraries :: pygame', |
| 27 | + 'Topic :: Games/Entertainment :: Arcade', |
37 | 28 | "Topic :: Games/Entertainment :: Real Time Strategy",
|
38 | 29 | ],
|
39 |
| - "py2exe.target": "", |
40 |
| - #'py2exe.icon':'icon.ico', #64x64 |
41 |
| - "py2exe.binary": APP_NAME, # leave off the .exe, it will be added |
42 |
| - "py2app.target": APP_NAME, |
43 |
| - "py2app.icon": "icon.icns", # 128x128 |
44 |
| - #'cx_freeze.cmd':'~/src/cx_Freeze-3.0.3/FreezePython', |
45 |
| - "cx_freeze.cmd": "cxfreeze", |
46 |
| - "cx_freeze.target": "%s_linux" % APP_NAME, |
47 |
| - "cx_freeze.binary": APP_NAME, |
48 |
| -} |
49 |
| - |
50 |
| - |
51 |
| -cmdclass = {} |
52 |
| -PACKAGEDATA = { |
53 |
| - "cmdclass": cmdclass, |
54 |
| - "package_dir": { |
55 |
| - "zanthor": "zanthor", |
| 30 | + license='GPL', |
| 31 | + author="Aaron, Phil, Rene, Tim", |
| 32 | + |
| 33 | + maintainer='Rene Dudfield', |
| 34 | + maintainer_email='[email protected]', |
| 35 | + description="Zanthor is a game where you play an evil robot castle which is powered by steam. @zanthorgame #python #pygame", |
| 36 | + url="http://github.com/pygame/zanthor/", |
| 37 | + include_package_data=True, |
| 38 | + long_description='Zanthor is a game where you play an evil robot castle which is powered by steam.', |
| 39 | + package_dir={'zanthor': 'zanthor'}, |
| 40 | + packages=find_packages(), |
| 41 | + install_requires=['pygame'], |
| 42 | + entry_points={ |
| 43 | + 'console_scripts': [ |
| 44 | + 'zanthor=zanthor.main:main', |
| 45 | + ], |
56 | 46 | },
|
57 |
| - "packages": [ |
58 |
| - "zanthor", |
59 |
| - "zanthor.pgu", |
60 |
| - "zanthor.pgu.gui", |
61 |
| - ], |
62 |
| - "scripts": ["scripts/zanthor"], |
63 |
| -} |
64 |
| - |
65 |
| -PACKAGEDATA.update(METADATA) |
66 |
| - |
67 |
| - |
68 |
| -from distutils.core import setup |
69 |
| -import sys |
70 |
| -import glob |
71 |
| -import os |
72 |
| -import shutil |
73 |
| - |
74 |
| -try: |
75 |
| - cmd = sys.argv[1] |
76 |
| -except IndexError: |
77 |
| - print("Usage: setup.py install|sdist") |
78 |
| - raise SystemExit |
79 |
| - |
80 |
| - |
81 |
| -# utility for adding subdirectories |
82 |
| -def add_files(dest, generator): |
83 |
| - for dirpath, dirnames, filenames in generator: |
84 |
| - for name in "CVS", ".svn": |
85 |
| - if name in dirnames: |
86 |
| - dirnames.remove(name) |
87 |
| - |
88 |
| - for name in filenames: |
89 |
| - if "~" in name: |
90 |
| - continue |
91 |
| - suffix = os.path.splitext(name)[1] |
92 |
| - if suffix in (".pyc", ".pyo"): |
93 |
| - continue |
94 |
| - if name[0] == ".": |
95 |
| - continue |
96 |
| - filename = os.path.join(dirpath, name) |
97 |
| - dest.append(filename) |
98 |
| - |
99 |
| - |
100 |
| -# define what is our data |
101 |
| -_DATA_DIR = os.path.join("zanthor", "data") |
102 |
| -data = [] |
103 |
| -add_files(data, os.walk(_DATA_DIR)) |
104 |
| - |
105 |
| - |
106 |
| -# data_dirs = [os.path.join(f2.replace(_DATA_DIR, 'data'), '*') for f2 in data] |
107 |
| -data_dirs = [os.path.join(f2.replace(_DATA_DIR, "data")) for f2 in data] |
108 |
| -PACKAGEDATA["package_data"] = {"zanthor": data_dirs} |
109 |
| - |
110 |
| - |
111 |
| -data.extend(glob.glob("*.txt")) |
112 |
| -data.extend(glob.glob("*.md")) |
113 |
| -# data.append('MANIFEST.in') |
114 |
| -# define what is our source |
115 |
| -src = [] |
116 |
| -add_files(src, os.walk("zanthor")) |
117 |
| -src.extend(glob.glob("*.py")) |
118 |
| - |
119 |
| - |
120 |
| -# build the sdist target |
121 |
| -if cmd not in "py2exe py2app cx_freeze".split(): |
122 |
| - f = open("MANIFEST.in", "w") |
123 |
| - for l in data: |
124 |
| - f.write("include " + l + "\n") |
125 |
| - for l in src: |
126 |
| - f.write("include " + l + "\n") |
127 |
| - f.close() |
128 |
| - |
129 |
| - setup(**PACKAGEDATA) |
| 47 | +) |
0 commit comments