From cc50e80c3be0df67bd80578f9823edda4861b3aa Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 4 Jul 2021 15:48:18 +0200 Subject: [PATCH 1/8] Update PyPI badge to link to package page. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 793d385..0d34bff 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | Tested version | PyPi package | Drone CI | Travis CI | |:--------|:------|:------|:------------| -| [![PyVersion](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) | ![PyPI](https://img.shields.io/pypi/v/torrentSearch) | [![Build Status](https://drone.schleppe.cloud/api/badges/KevinMidboe/torrent_search/status.svg)](https://drone.schleppe.cloud/KevinMidboe/torrent_search) | [![Build Status](https://travis-ci.org/KevinMidboe/torrent_search.svg?branch=master)](https://travis-ci.org/KevinMidboe/torrent_search) +| [![PyVersion](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) | [![PyPI](https://img.shields.io/pypi/v/torrentSearch)](https://pypi.org/project/torrentSearch/) | [![Build Status](https://drone.schleppe.cloud/api/badges/KevinMidboe/torrent_search/status.svg)](https://drone.schleppe.cloud/KevinMidboe/torrent_search) | [![Build Status](https://travis-ci.org/KevinMidboe/torrent_search.svg?branch=master)](https://travis-ci.org/KevinMidboe/torrent_search) | Code coverage | Known vulnerabilities | License | |:--------|:------|:------------| -- 2.34.1 From 2cfc9d3cde8f83526457e3429139a2c6cba2960b Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:00:08 +0200 Subject: [PATCH 2/8] Trying explicitly defining colored package version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 039d39e..3935a74 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( 'docopt', 'beautifulsoup4', 'termcolor', - 'colored', + 'colored==1.3.5' ], url='https://github.com/KevinMidboe/torrent_search', classifiers=[ -- 2.34.1 From 241a42b31d1185e743fd209c5ad2e5e977acf182 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:00:51 +0200 Subject: [PATCH 3/8] Try first installing from requirements. --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 3c642dd..54ceac2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,6 +11,7 @@ steps: - name: Install python image: python:3.8 commands: + - pip install -r requirements.txt - python setup.py install - pip install pytest - pytest -- 2.34.1 From 0d5da784ae094d857cd238c4ef68c37fb982b5b9 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:04:21 +0200 Subject: [PATCH 4/8] Tried defining pyproject file. --- pyproject.toml | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..86cc085 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] + +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.py b/setup.py index 3935a74..0079192 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( 'docopt', 'beautifulsoup4', 'termcolor', - 'colored==1.3.5' + 'colored' ], url='https://github.com/KevinMidboe/torrent_search', classifiers=[ -- 2.34.1 From 56451f13720ee82730b803ef04519991cef149eb Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:06:02 +0200 Subject: [PATCH 5/8] Requirements references setup packages. --- requirements.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4a10510..945c9b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1 @@ -beautifulsoup4>=4.6.0 -termcolor>=1.1.0 -docopt==0.6.2 -colored==1.3.5 +. \ No newline at end of file -- 2.34.1 From 5c787852a08862e7b12075437e217f1023bfdc5a Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:09:54 +0200 Subject: [PATCH 6/8] Import __version__ from import statement directly. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0079192..b220efc 100644 --- a/setup.py +++ b/setup.py @@ -5,14 +5,14 @@ from setuptools import setup, find_packages from sys import path from os.path import dirname -import torrentSearch +from torrentSearch.__init__ import __version__ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name='torrentSearch', - version=torrentSearch.__version__, + version=__version__, packages=find_packages(), package_data={ 'torrentSearch': ['default_config.ini'], -- 2.34.1 From 6ecf05bb392d8c1ff2fbc17f6b7e61c6e2597321 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:14:29 +0200 Subject: [PATCH 7/8] Removed unused packages and restored requirements file. --- requirements.txt | 3 ++- setup.py | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 945c9b4..c910e71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -. \ No newline at end of file +docopt==0.6.2 +colored==1.3.5 diff --git a/setup.py b/setup.py index b220efc..ae3a374 100644 --- a/setup.py +++ b/setup.py @@ -5,14 +5,14 @@ from setuptools import setup, find_packages from sys import path from os.path import dirname -from torrentSearch.__init__ import __version__ +import torrentSearch with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name='torrentSearch', - version=__version__, + version=torrentSearch.__version__, packages=find_packages(), package_data={ 'torrentSearch': ['default_config.ini'], @@ -23,8 +23,6 @@ setup( long_description_content_type='text/markdown', install_requires=[ 'docopt', - 'beautifulsoup4', - 'termcolor', 'colored' ], url='https://github.com/KevinMidboe/torrent_search', -- 2.34.1 From d568f9c92c78f7d9c09465d74280bd94a2156856 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 4 Jul 2021 16:15:35 +0200 Subject: [PATCH 8/8] Install dependencies before running setup. --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 54ceac2..ba56ad9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,8 +19,8 @@ steps: - name: Upload coverage report image: python:3.8 commands: - - python setup.py install - pip install -r requirements-dev.txt + - python setup.py install - coverage run -m pytest - codecov -t $CODECOV_TOKEN environment: -- 2.34.1