This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
56 lines (45 loc) · 1.38 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
from setuptools import setup
from setuptools.command.install import install
from setuptools.command.install_scripts import install_scripts
from distutils import log
import pathlib
import re
import os
here = pathlib.Path(__file__).parent.resolve()
content = (here / 'README.md').read_text(encoding='utf-8')
summary = re.search('(?sia)What\?\n----\n(.+?)\n\n', content)[1]
class postinstall(install):
"""Post-installation for development mode."""
def run(self):
mode = 0o700
install.run(self)
for filepath in self.get_outputs():
exepath = os.path.join('Tor', 'tor')
if exepath in filepath:
log.warn('setting %s executable' % filepath)
os.chmod(filepath, mode)
setup(
name='toraio',
version='1.1.0',
url='https://github.com/ultrafunkamsterdam/toraio',
license='MIT',
author='UltrafunkAmsterdam',
author_email='',
desc=summary,
long_description=content,
long_description_content_type='text/markdown',
package_dir={'toraio': 'toraio'},
package_data={'toraio': ['bin/linux/Tor/tor', 'bin/linux/*' ,'bin/win32/Tor/tor.exe']
},
packages=['toraio'],
include_package_data=True,
install_requires=[
'pysocks',
'aiohttp',
'aiosocks2',
'stem',
],
cmdclass = {
'install': postinstall,
},
)