forked from newville/pyshortcuts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
69 lines (62 loc) · 2.8 KB
/
setup.py
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
#!/usr/bin/env python
from setuptools import setup
import sys
import os
long_description = '''
Pyshortcuts helps developers and Python users to create shortcuts on a
Users Desktop or Start Menu that will run python scripts and applications.
Pyshortcuts is cross-platform, supporting Windows, MacOS, and Linux each in
the way most natural for the OS. On Windows, a Shortcut or Link is
created. On Linux a ".desktop" file is created. On MacOS, a minimal
Application is created. In all cases, the shortcuts are put either
directly on the Desktop or Start Menu , or in a folder on the Desktop or
Start Menu of the current user. That means that there is not need for
elevated permission or writing to system-level files (registry,
/Applications, /usr/bin). The user has complete control to rename, move,
or delete the shortcut after it is created. Shortcuts can have a custom
icon (`.ico` files on Windows or Linux, or `.icns` files on MacOS)
specified, defaulting to a Python icon included with the pyshortcuts
module.
Pyshortcuts is pure python, has a small footprint and is very easy to
install and use either from a python script. That is to say, it can easily
be part of a installation (or post-installation process) process for larger
packages.
'''
install_reqs = ['six']
if sys.platform.startswith('win'):
install_reqs.append('pywin32')
version = '1.4'
here, s = os.path.split(__file__)
with open(os.path.join(here, 'pyshortcuts', '__init__.py'), 'r') as fh:
text = fh.readlines()
for line in text:
line = line[:-1].strip()
if line.startswith('__version'):
words = line.split('=')
version = words[1].strip()
if version.startswith("'") and version.endswith("'"):
version = version[1:-1]
break
setup(name='pyshortcuts',
version=version,
author='Matthew Newville',
author_email='newville@cars.uchicago.edu',
url='http://github.com/newville/pyshortcuts',
license = 'OSI Approved :: MIT License',
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
description='create desktop and Start Menu shortcuts for python scripts',
long_description=long_description,
packages=['pyshortcuts'],
install_requires=install_reqs,
classifiers=[
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
],
package_data={'pyshortcuts': ['icons/*']},
entry_points={'console_scripts' : ['pyshortcut = pyshortcuts:shortcut_cli']}
)