packaging onionshare more proper-like

This commit is contained in:
Micah Lee 2014-05-24 21:16:44 -04:00
parent 8fa3fe3bfb
commit 6791fc48ce
7 changed files with 7 additions and 24 deletions

View File

@ -1,12 +0,0 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You need to run this as root" 1>&2
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export ONIONSHARE_PLATFORM=Tails
$DIR/onionshare $@

1
onionshare/__init__.py Normal file
View File

@ -0,0 +1 @@
from onionshare import *

5
onionshare → onionshare/onionshare.py Executable file → Normal file
View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
import os, sys, subprocess, time, hashlib, platform, json, locale, socket
from random import randint
from functools import wraps
@ -139,6 +137,3 @@ def main():
# shutdown
tails_close_port(port)
if __name__ == '__main__':
main()

View File

@ -4,13 +4,11 @@
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
@ -23,24 +21,25 @@ setup(
author='Micah Lee',
author_email='micah@micahflee.com',
url='https://github.com/micahflee/onionshare',
py_modules = ['onionshare'],
include_package_data=True,
install_requires=[
'flask >= 0.10.1',
'stem >= 1.1.1'
],
license="GPL v3",
zip_safe=False,
keywords='onion, share, onionshare, tor, anonymous, web server',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GPL License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
],
test_suite='tests',
entry_points={'console_scripts': ['onionshare = onionshare:main']}
packages=['onionshare'],
scripts=['bin/onionshare', 'bin/tails-onionshare']
)