Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c433932

Browse files
authored
Merge pull request #11722 from anntzer/setup.py
Remove unnecessary hacks from setup.py.
2 parents 108501c + 1ec9c91 commit c433932

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

setup.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
# to ensure that we error out properly for people with outdated setuptools
88
# and/or pip.
99
from string import Template
10+
import sys
1011
from setuptools import setup
1112
from setuptools.command.test import test as TestCommand
1213
from setuptools.command.build_ext import build_ext as BuildExtCommand
1314

14-
import sys
15-
1615
if sys.version_info < (3, 5):
1716
error = """
1817
Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3.3, or 3.4.
@@ -24,23 +23,6 @@
2423
"""
2524
sys.exit(error)
2625

27-
# distutils is breaking our sdists for files in symlinked dirs.
28-
# distutils will copy if os.link is not available, so this is a hack
29-
# to force copying
30-
import os
31-
try:
32-
del os.link
33-
except AttributeError:
34-
pass
35-
36-
# This 'if' statement is needed to prevent spawning infinite processes
37-
# on Windows
38-
if __name__ == '__main__':
39-
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
40-
# update it when the contents of directories change.
41-
if os.path.exists('MANIFEST'):
42-
os.remove('MANIFEST')
43-
4426
# The setuptools version of sdist adds a setup.cfg file to the tree.
4527
# We don't want that, so we simply remove it, and it will fall back to
4628
# vanilla distutils.

0 commit comments

Comments
 (0)