forked from Hammer2900/python-mss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
84 lines (78 loc) · 3.03 KB
/
setup.py
File metadata and controls
84 lines (78 loc) · 3.03 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import sys
from distutils.core import setup
from os import unlink
from platform import architecture, system
from shutil import copyfile as copy
from mss import __version__
with open('MANIFEST.in', 'w') as fileh:
files = ['include *.rst', 'include doc/*', 'prune test*']
fileh.write("\n".join(files))
todo = 'check' not in sys.argv and system() == 'Linux'
data_files = []
if todo:
file_ok = 'libmss.so'
file_ = 'dep/linux/32/libmss.so'
if architecture()[0].startswith('64'):
file_ = 'dep/linux/64/libmss.so'
copy(file_, file_ok)
data_files.append(('/usr/lib/', [file_ok]))
setup(
name='mss',
version=__version__,
author='Tiger-222',
py_modules=['mss'],
author_email='mickael@jmsinfo.co',
description='A very fast cross-platform multiple screenshots module in pure python using ctypes',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Other Audience',
'License :: OSI Approved :: zlib/libpng License',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft',
'Operating System :: Microsoft :: Windows',
'Operating System :: Microsoft :: Windows :: Windows 7',
'Operating System :: Microsoft :: Windows :: Windows Vista',
'Operating System :: Microsoft :: Windows :: Windows XP',
'Operating System :: OS Independent',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
#'Programming Language :: Python :: 3.5',
'Topic :: Desktop Environment',
'Topic :: Multimedia :: Graphics :: Capture',
'Topic :: Multimedia :: Graphics :: Capture :: Screen Capture',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
url='https://github.com/BoboTiG/python-mss',
data_files=data_files
)
if todo and 'install' in sys.argv:
from subprocess import call
print('Removing {0}'.format(file_ok))
unlink(file_ok)
try:
print('Removing /etc/ld.so.cache')
unlink('/etc/ld.so.cache')
print('Writing /etc/ld.so.cache')
ret = call(['ldconfig'])
except OSError:
pass