Skip to content

Commit ddf2bdb

Browse files
committed
Fix source distribution: use distutils rather then setuptools for the
'sdist' command.
1 parent 286cbf0 commit ddf2bdb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88

99
from distutils.cmd import Command as du_cmd
10+
import distutils.command.sdist
1011
import distutils.log
1112
import os
1213
import os.path
@@ -15,7 +16,6 @@
1516
import string
1617
from setuptools import setup
1718
import setuptools.command.build_py
18-
import setuptools.command.sdist
1919
try:
2020
import setuptools_scm
2121
version = setuptools_scm.get_version()
@@ -68,7 +68,10 @@ def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1,
6868
class build_py(copy_file_mixin, setuptools.command.build_py.build_py):
6969
pass
7070

71-
class sdist(copy_file_mixin, setuptools.command.sdist.sdist):
71+
# Note: Do not use setuptools for making the source distribution,
72+
# rather use the good old distutils instead.
73+
# Rationale: https://rhodesmill.org/brandon/2009/eby-magic/
74+
class sdist(copy_file_mixin, distutils.command.sdist.sdist):
7275
pass
7376

7477
setup(

0 commit comments

Comments
 (0)