python-tuf/setup.py
Lukas Puehringer 842f843210 Remove duplicate testing simple_server.py
tests/simple_server.py was copied to tuf/scripts/ to "make testing
easier" (cf84d3f51f), although with
the current test setup the original (and recently patched to fix an
Windows/Py2 test issue) test simple_server.py can be used just as
well.

This commit:
- removes tuf/scripts/simple_server.py
  Note: that version slightly differed from the original test
  server, probably due to demands by the linter that is only executed
  on the tuf core code and not on the tests. However, for the testing
  purposes of simple_server.py these changes (i.e., `SystemRandom()`,
  `if __name__ =='__main__':`) are not necessary.
- updates the tests that used tuf.scripts.simple_server to instead
  use tests.simple_server,
- updates setup.py to not install the simple_server module as
  script, when installing tuf, as it is only a testing script and
  not meant for end-user usage.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-02-25 14:55:36 +01:00

129 lines
3.9 KiB
Python
Executable file

#!/usr/bin/env python
# Copyright 2013 - 2018, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
<Program Name>
setup.py
<Author>
Vladimir Diaz <vladimir.v.diaz@gmail.com>
<Started>
March 2013.
<Copyright>
See LICENSE-MIT OR LICENSE for licensing information.
<Purpose>
BUILD SOURCE DISTRIBUTION
The following shell command generates a TUF source archive that can be
distributed to other users. The packaged source is saved to the 'dist'
folder in the current directory.
$ python setup.py sdist
INSTALLATION OPTIONS
pip - installing and managing Python packages (recommended):
# Installing from Python Package Index (https://pypi.python.org/pypi).
$ pip install tuf
# Installing from local source archive.
$ pip install <path to archive>
# Or from the root directory of the unpacked archive.
$ pip install .
# Installing optional requirements (i.e., after installing tuf).
# The 'tools' optional requirement is currently supported, which enables
# fast and secure ed25519 key generation, and signature verification
# computations with PyNaCl+libsodium. General-purpose cryptography is also
# provided. 'tools' is needed by the TUF repository tools. Clients that
# require verification of RSASSA-PSS signatures must also install tuf[tools].
$ pip install tuf[tools]
Alternate installation options:
Navigate to the root directory of the unpacked archive and
run one of the following shell commands:
Install to the global site-packages directory.
$ python setup.py install
Install to the user site-packages directory.
$ python setup.py install --user
Install to a chosen directory.
$ python setup.py install --home=<directory>
Note: The last two installation options may require modification of
Python's search path (i.e., 'sys.path') or updating an OS environment
variable. For example, installing to the user site-packages directory might
result in the installation of TUF scripts to '~/.local/bin'. The user may
then be required to update his $PATH variable:
$ export PATH=$PATH:~/.local/bin
"""
from setuptools import setup
from setuptools import find_packages
with open('README.md') as file_object:
long_description = file_object.read()
setup(
name = 'tuf',
version = '0.12.2', # If updating version, also update it in tuf/__init__.py
description = 'A secure updater framework for Python',
long_description = long_description,
long_description_content_type='text/markdown',
author = 'https://www.updateframework.com',
author_email = 'theupdateframework@googlegroups.com',
url = 'https://www.updateframework.com',
keywords = 'update updater secure authentication key compromise revocation',
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Security',
'Topic :: Software Development'
],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4",
install_requires = [
'iso8601>=0.1.12',
'requests>=2.19.1',
'six>=1.11.0',
'securesystemslib>=0.12.0'
],
tests_require = [
'mock; python_version < "3.3"'
],
packages = find_packages(exclude=['tests']),
scripts = [
'tuf/scripts/repo.py',
'tuf/scripts/client.py'
]
)