forked from cmccabe/linkulator2
Requires Python 3.6, configures tox for testing different Python versions
This commit is contained in:
parent
0d0f0720ca
commit
650b3d4bb3
|
@ -1,2 +1,6 @@
|
|||
__pycache__
|
||||
.mypy_cache
|
||||
.tox
|
||||
/*.egg-info
|
||||
/dist
|
||||
/build
|
||||
|
|
11
README.md
11
README.md
|
@ -24,6 +24,17 @@ user@server:~$ linkulator
|
|||
Enter a category ID, p to post a link, s to search, or q to quit:
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Linkulator requires Python 3.6.9 or greater. If you use an earlier version, you may get the following error:
|
||||
|
||||
```shell
|
||||
File "./linkulator.py", line 21
|
||||
link_data: list = LinkData.link_data
|
||||
^
|
||||
SyntaxError: invalid syntax
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
Just clone this repo into any location in users' paths. Each user can have their own copy, in case they want to customize it, or you can install a central version in /usr/local/bin.
|
||||
|
|
|
@ -446,18 +446,6 @@ def signal_handler(sig, frame):
|
|||
|
||||
def main():
|
||||
"""main function - handles argument parsing and calls menu system"""
|
||||
|
||||
low_py_ver = 3.6
|
||||
py_ver = str(sys.version_info[0]) + "." + str(sys.version_info[1])
|
||||
py_ver = float(py_ver)
|
||||
if py_ver < low_py_ver:
|
||||
raise Exception(
|
||||
"Must be using Python "
|
||||
+ str(low_py_ver)
|
||||
+ " or higher. Instead you're using "
|
||||
+ str(py_ver)
|
||||
)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
args = sys.argv[1:]
|
||||
config.init()
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(
|
||||
name="linkulator",
|
||||
version="2.0.0",
|
||||
author="cmccabe",
|
||||
author_email="rawtext.club",
|
||||
description="Linkulator is a command line link aggregator; somewhat like news.ycombinator.com, or lobste.rs, but simpler and run from the command line.",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://tildegit.org/cmccabe/linkulator2",
|
||||
packages=find_packages(),
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||
"Operating System :: POSIX",
|
||||
],
|
||||
python_requires='>=3.6',
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
||||
# in multiple virtualenvs. This configuration file will run the
|
||||
# test suite on all supported python versions. To use it, "pip install tox"
|
||||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = py36, py37, py38
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
|
||||
commands =
|
||||
python3 -m unittest discover -s tests -p "*_test.py"
|
Loading…
Reference in New Issue