-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix to prevent setup.py from import theonionbox; addressing PEP#517. * Housekeeping: Removed some artefacts. * Dashboard: Session 'prepared' after successful login was not accepted as valid. Fixed. * Dashboard: Truncate __HashedControlSessionPassword (alike HashedControlPassword). No need to show this in full length. * 19.3
- Loading branch information
1 parent
5b1baf0
commit aab150c
Showing
6 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,22 @@ | |
import setuptools.command.build_ext | ||
import setuptools.command.sdist | ||
import setuptools.command.install | ||
import theonionbox.stamp as stamp | ||
|
||
from distutils.extension import Extension | ||
|
||
# This code replaces ... | ||
# import theonionbox.stamp as stamp | ||
# used here up to TOB 19.2 | ||
# but failing meanwhile with pip > 18 due to PEP#517 trouble | ||
# ref: https://github.com/pypa/pip/issues/6163 | ||
# ref: https://packaging.python.org/guides/single-sourcing-package-version/: | ||
|
||
stamp = {} | ||
with open("theonionbox/stamp.py") as fp: | ||
exec(fp.read(), stamp) | ||
|
||
# later on we use: stamp['__version__'] | ||
|
||
# Custom command to compile the latest README.html | ||
# BTW: grip is quite cool! | ||
def CompileREADME(): | ||
|
@@ -72,7 +84,7 @@ def file_as_blockiter(afile, blocksize=65536): | |
|
||
if (old_md_hash != current_md_hash) or (old_html_hash != current_html_hash): | ||
from grip import export | ||
export(path='README.md', out_filename='readme/README.html', title=f'{stamp.__title__} v{stamp.__version__}') | ||
export(path='README.md', out_filename='readme/README.html', title=f"{stamp['__title__']} v{stamp['__version__']}") | ||
hash_changed = True | ||
else: | ||
print('Skiping generation of README.html; files unchanged!') | ||
|
@@ -302,11 +314,11 @@ def generate_data_files(data_files): | |
|
||
package_data_exclude = { | ||
'theonionbox': ['sections/controlcenter/*', | ||
'sections/cc/*', | ||
] | ||
} | ||
|
||
data_files = [ | ||
# ('', ['pyproject.toml']), | ||
('docs', ['docs/*.*']), | ||
('', ['readme/README.html']), | ||
('config', ['theonionbox/config/*.*']), | ||
|
@@ -368,7 +380,7 @@ def generate_data_files(data_files): | |
cmdclass={'sdist': sdist, | ||
}, | ||
name='theonionbox', | ||
version=stamp.__version__, | ||
version=stamp['__version__'], | ||
# py_modules=['theonionbox.py'], | ||
packages=packages, | ||
package_dir=package_dir, | ||
|
@@ -381,7 +393,7 @@ def generate_data_files(data_files): | |
license='MIT', | ||
author='Ralph Wetzel', | ||
author_email='[email protected]', | ||
description=f'{stamp.__title__}: {stamp.__description__}', | ||
description=f"{stamp['__title__']}: {stamp['__description__']}", | ||
long_description=open('docs/description.rst', 'rb').read().decode('utf-8'), | ||
entry_points={ | ||
'console_scripts': [ | ||
|
@@ -394,7 +406,7 @@ def generate_data_files(data_files): | |
'requests>=2.21', | ||
'PySocks>=1.6.7', | ||
'bottle>=0.12.16', | ||
'stem>=1.7.0', | ||
'stem4tob>=1.7.1.post3', | ||
'tzlocal>=1.5', | ||
# 'futures>=3.2; python_version<"3.0"', | ||
'urllib3>=1.22', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ def main(): | |
|
||
if __name__ == '__main__': | ||
|
||
args = sys.argv[1:] | ||
# args = sys.argv[1:] | ||
main() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__title__ = 'The Onion Box' | ||
__description__ = 'Dashboard to monitor Tor node operations.' | ||
__version__ = '19.2' | ||
__stamp__ = '20191202|224123' | ||
__version__ = '19.3' | ||
__stamp__ = '20191229|232641' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters