-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
64 lines (50 loc) · 2.11 KB
/
setup.py
File metadata and controls
64 lines (50 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import setup, find_packages
from distutils.command.install import install
import os, shutil
class Install(install):
def run(self):
#os.system("/setup.py build")
dirPath = os.path.dirname(__file__)
autostart_dir = "/usr/share/autostart"
project_dir = "/usr/share/kaptan"
pixmap_dir = "/usr/share/pixmaps"
applications_dir = "/usr/share/applications"
icon = os.path.join(dirPath, "data", "images", "kaptan-icon.png")
try:
os.makedirs(autostart_dir)
os.makedirs(project_dir)
except OSError:
print("He de geç...")
shutil.copy(os.path.join(dirPath, "data", "kaptan.desktop"), autostart_dir)
shutil.copy(os.path.join(dirPath, "data", "kaptan.desktop"), applications_dir)
shutil.copy(icon, os.path.join(pixmap_dir, "kaptan.png"))
shutil.copy("kaptan.py", os.path.join(project_dir, "kaptan5.py"))
shutil.copy("rc_kaptan.py", project_dir)
os.chmod("script/kaptan",0o755)
shutil.copy("script/kaptan", "/usr/bin")
os.system("cp -R languages {}".format(project_dir))
os.system("cp -R data {}".format(project_dir))
os.system("cp -R kaptan {}".format(project_dir))
docs = ["AUTHORS", "kaptan.pro", "kaptan.qrc", "LICENSE", "MANIFEST.in", "README", "TODO"]
for doc in docs:
shutil.copy(doc, project_dir)
setup(
name = "kaptan",
packages = find_packages(),
package_data = {os.path.dirname(__file__) : ["languages/*", "data/images/*" ,"data/*"]},
scripts = ["script/kaptan"],
version = "1.0",
license = "GPL v3",
description = "PisiLinux desktop configurate.",
author = "Metehan Özbek",
author_email = "mthnzbk@gmail.com",
url = "https://github.com/mthnzbk/kaptan",
download_url = "https://pypi.python.org/pypi/kaptan",
keywords = ["PyQt5"],
classifiers = [
"Environment :: X11 Applications :: Qt",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3",
],
cmdclass = {'install': Install}
)