Skip to content

Commit

Permalink
stop being smart for sdist
Browse files Browse the repository at this point in the history
should fix #114
  • Loading branch information
RonnyPfannschmidt committed Oct 20, 2016
1 parent 63a122c commit 6b6c6cf
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import os
import sys
import setuptools
from setuptools.command.sdist import sdist as sdist_orig


PROBLEMATIC_COMMANDS = 'install', 'develop', 'easy_install', 'bdist_egg'
Expand All @@ -39,25 +38,6 @@ def scm_config():
long_description = fp.read()


class sdist(sdist_orig):
def make_release_tree(self, base_dir, files):
sdist_orig.make_release_tree(self, base_dir, files)
target = os.path.join(base_dir, 'setup.py')
with open(__file__) as fp:
template = fp.read()
ver = self.distribution.version
if not ver:
from setuptools_scm import get_version
ver = get_version(**scm_config())

finalized = template.replace(
'use_scm_version=scm_config,\n',
'version="%s",\n' % ver)
os.remove(target)
with open(target, 'w') as fp:
fp.write(finalized)


arguments = dict(
name='setuptools_scm',
url='https://github.com/pypa/setuptools_scm/',
Expand Down Expand Up @@ -116,7 +96,6 @@ def make_release_tree(self, base_dir, files):
'Topic :: System :: Software Distribution',
'Topic :: Utilities',
],
cmdclass={'sdist': sdist}
)

if __name__ == '__main__':
Expand Down

0 comments on commit 6b6c6cf

Please sign in to comment.