From a003204f21b486d255141eb05739e08f90e99054 Mon Sep 17 00:00:00 2001 From: jose Date: Thu, 3 Sep 2020 01:16:53 -0300 Subject: [PATCH 1/2] Remove the use of distutils in 'setup.py' --- Makefile | 4 +++- setup.py | 8 ++------ tox.ini | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 42b498cbc..1ffa95181 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ build: clean prepare ls -l dist/ clean: - rm -rf build/ dist/ *.egg-info/ kytos/web-ui-* + rm -vrf build/ dist/ *.egg-info/ kytos/web-ui-* + find . -name __pycache__ -type d | xargs rm -rf + test -d docs && make -C docs/ clean prepare: pip3 install --upgrade pip setuptools wheel twine diff --git a/setup.py b/setup.py index b9f145f6e..b7770e03d 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,6 @@ import sys from abc import abstractmethod # Disabling checks due to https://github.com/PyCQA/pylint/issues/73 -from distutils.command.clean import clean # pylint: disable=E0401,E0611 from pathlib import Path from subprocess import CalledProcessError, call, check_call @@ -99,17 +98,14 @@ def finalize_options(self): sys.exit(-1) -class Cleaner(clean): +class Cleaner(SimpleCommand): """Custom clean command to tidy up the project root.""" description = 'clean build, dist, pyc and egg from package and docs' def run(self): """Clean build, dist, pyc and egg from package and docs.""" - super().run() - call('rm -vrf ./build ./dist ./*.egg-info', shell=True) - call('find . -name __pycache__ -type d | xargs rm -rf', shell=True) - call('test -d docs && make -C docs/ clean', shell=True) + call('make clean', shell=True) class Test(TestCommand): diff --git a/tox.ini b/tox.ini index 4e0bd4a0c..988c78b9f 100644 --- a/tox.ini +++ b/tox.ini @@ -5,11 +5,15 @@ envlist = py36 [testenv] whitelist_externals= rm + make commands= ; Force packaging even if setup.{py,cfg} haven't changed rm -rf ./kytos.egg-info/ python setup.py ci + # The build of documetation are being done outside of tox env, so it is + # necessary clear the build after run ci command with "make clean-C docs". + make clean -C docs deps= -rrequirements/dev.txt From da559a1ebb678374cecd256511a564f9aca03b9d Mon Sep 17 00:00:00 2001 From: josemauro Date: Wed, 14 Oct 2020 08:31:59 -0300 Subject: [PATCH 2/2] Update tox.ini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Humberto DiĆ³genes --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 988c78b9f..2036c357e 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,8 @@ commands= ; Force packaging even if setup.{py,cfg} haven't changed rm -rf ./kytos.egg-info/ python setup.py ci - # The build of documetation are being done outside of tox env, so it is - # necessary clear the build after run ci command with "make clean-C docs". + # The build of the documentation is running outside the tox env, so it is + # necessary to clear the build after running ci. make clean -C docs deps=