-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
65 lines (58 loc) · 2.81 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
MyOnion | https://github.com/hiromipaw/myonion
Copyright (C) 2018 hiro <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os, sys, platform, tempfile
from distutils.core import setup
def file_list(path):
files = []
for filename in os.listdir(path):
if os.path.isfile(os.path.join(path, filename)):
files.append(os.path.join(path, filename))
return files
version = open('share/version.txt').read().strip()
description = (
"""MyOnion lets you securely and anonymously share a website from your computer. """
"""It works by starting a docker container, serving a website, making it """
""" accessible as a Tor hidden service, and generating an unguessable URL to interact with it.""")
long_description = description + " " + (
"""It doesn't require setting up a server on the internet somewhere or using a third """
"""party hosting service. You host the website on your own computer and use a Tor """
"""hidden service to make it temporarily accessible over the internet. The other user """
"""just needs to use Tor Browser to visit your website."""
)
author = 'hiro'
author_email = '[email protected]'
url = 'https://github.com/hiromipaw/myonion'
license = 'GPL v3'
keywords = 'onion, share, website, myonion, tor, anonymous, web server'
data_files=[
(os.path.join(sys.prefix, 'share/myonion'), file_list('share')),
(os.path.join(sys.prefix, 'share/myonion/images'), file_list('share/images')),
(os.path.join(sys.prefix, 'share/myonion/locale'), file_list('share/locale')),
(os.path.join(sys.prefix, 'share/myonion/static/css'), file_list('share/static/css')),
(os.path.join(sys.prefix, 'share/myonion/static/images'), file_list('share/static/images')),
(os.path.join(sys.prefix, 'share/myonion/static/js'), file_list('share/static/js'))
]
setup(
name='myonion', version=version,
description=description, long_description=long_description,
author=author, author_email=author_email,
url=url, license=license, keywords=keywords,
packages=['myonion', 'myonion_gui'],
include_package_data=True,
scripts=['install/scripts/myonion', 'install/scripts/myonion-gui'],
data_files=data_files
)