Skip to content

Commit

Permalink
Remove setuptools hack for installation prefix
Browse files Browse the repository at this point in the history
Not working any longer. setuptools installation is deprecated anyway.
  • Loading branch information
coldfix committed Dec 11, 2024
1 parent 2d1e84a commit 97c578b
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup, Command
from setuptools.command.install import install as orig_install
from distutils.command.build import build as orig_build

from subprocess import call
Expand Down Expand Up @@ -49,26 +48,8 @@ def make_mo(self, po_filename, mo_filename):
logging.warning(e)


# NOTE: Subclassing the setuptools install command alters its behaviour to use
# the distutils code. This is due to some really odd call-context checks in
# the setuptools command.
#
# In fact this is desirable because distutils (correctly) installs data files
# to `sys.prefix` whereas setuptools by default installs to the egg folder
# (which is pretty much useless) and doesn't invoke build commands before
# install. The only real drawback with the distutils behaviour is that it does
# not automatically install dependencies, but we can easily live with that.
#
# Note further that we need to subclass the *setuptools* install command
# rather than the *distutils* one to prevent errors when installing with pip
# from the source distribution.
class install(orig_install):
pass


setup(
cmdclass={
'install': install,
'build': build,
'build_mo': build_mo,
},
Expand Down

0 comments on commit 97c578b

Please sign in to comment.