forked from pombredanne/udemy-dl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (40 loc) · 1.4 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
#!/usr/bin/env python
import os
import subprocess
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requirements = [pkg.split('=')[0] for pkg in open('requirements.txt').readlines()]
description = 'Download videos from Udemy for personal offline use'
try:
subprocess.call(["pandoc", "README.md", "-f", "markdown", "-t", "rst", "-o", "README.rst"])
long_description = open("README.rst").read()
except OSError:
print("Pandoc not installed")
long_description = description
classifiers = ['Environment :: Console',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Multimedia :: Video',
]
version = open('CHANGES.txt').readlines()[0][1:].strip()
# if installed as root or with sudo, set permission mask to allow read/exec for all users
try:
if os.getuid() == 0:
os.umask(int('022', 8))
except AttributeError:
pass
setup(name='udemy-dl',
version=version,
description=description,
author='Gaganpreet Singh Arora',
author_email='[email protected]',
url='https://github.com/gaganpreet/udemy-dl',
scripts=['src/udemy-dl',],
install_requires=requirements,
long_description=long_description,
packages=['udemy_dl'],
package_dir = {'udemy_dl': 'src/udemy_dl'},
classifiers=classifiers
)