Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Update setup.py to use native setuptools install #1114

Merged
merged 1 commit into from
Aug 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 13 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import pip # pylint: disable=unused-import
from setuptools import Command, find_packages, setup
from setuptools.command.egg_info import egg_info
from setuptools.command.install import install
except ModuleNotFoundError:
print('Please install python3-pip and run setup.py again.')
sys.exit(-1)
Expand Down Expand Up @@ -191,21 +190,21 @@ def run(self):
check_call(cmd, shell=True)


class InstallMode(install):
"""Class used to overwrite the default installation using setuptools."""
# class InstallMode(install):
# """Class used to overwrite the default installation using setuptools."""

def run(self):
"""Install the package in install mode.
# def run(self):
# """Install the package in install mode.

super().run() does not install dependencies when running
``python setup.py install`` (pypa/setuptools#456).
"""
if 'bdist_wheel' in sys.argv:
# do not use eggs, but wheels
super().run()
else:
# force install of deps' eggs during setup.py install
self.do_egg_install()
# super().run() does not install dependencies when running
# ``python setup.py install`` (pypa/setuptools#456).
# """
# if 'bdist_wheel' in sys.argv:
# # do not use eggs, but wheels
# super().run()
# else:
# # force install of deps' eggs during setup.py install
# self.do_egg_install()


# class DevelopMode(develop):
Expand Down Expand Up @@ -256,7 +255,6 @@ def run(self):
'coverage': TestCoverage,
'doctest': DocTest,
'egg_info': EggInfo,
'install': InstallMode,
'lint': Linter,
'test': Test
},
Expand Down