r46905 - remove some old trash

hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: hawkowl
Date: Thu Mar  3 19:44:09 2016
New Revision: 46905

Modified:
   branches/sdist-use-7985-3/setup.py
   branches/sdist-use-7985-3/twisted/python/dist.py

Log:
remove some old trash

Modified: branches/sdist-use-7985-3/setup.py
==============================================================================
--- branches/sdist-use-7985-3/setup.py	(original)
+++ branches/sdist-use-7985-3/setup.py	Thu Mar  3 19:44:09 2016
@@ -9,18 +9,14 @@
 
 import os
 import sys
-
 import setuptools
 
-from pkg_resources import parse_requirements
-
 # Tell Twisted not to enforce zope.interface requirement on import, since
 # we're going to have to import twisted.python.dist and can rely on
 # setuptools to install dependencies.
 setuptools._TWISTED_NO_CHECK_REQUIREMENTS = True
 
 
-
 def main(args):
     """
     Invoke twisted.python.dist with the appropriate metadata about the
@@ -35,26 +31,23 @@
     if os.path.exists('twisted'):
         sys.path.insert(0, '.')
 
-    setup_args = {}
     requirements = ["zope.interface >= 3.6.0"]
 
-    setup_args['install_requires'] = requirements
-    setup_args['include_package_data'] = True
-    setup_args['zip_safe'] = False
-
     from twisted.python.dist import (
         STATIC_PACKAGE_METADATA, getExtensions, getScripts,
         setup, _EXTRAS_REQUIRE)
 
-    scripts = getScripts()
+    setup_args = STATIC_PACKAGE_METADATA.copy()
 
     setup_args.update(dict(
         packages=setuptools.find_packages(),
+        install_requires=requirements,
         conditionalExtensions=getExtensions(),
-        scripts=scripts,
+        scripts=getScripts(),
         include_package_data=True,
+        zip_safe=False,
         extras_require=_EXTRAS_REQUIRE,
-        **STATIC_PACKAGE_METADATA))
+    ))
 
     setup(**setup_args)
 

Modified: branches/sdist-use-7985-3/twisted/python/dist.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/dist.py	(original)
+++ branches/sdist-use-7985-3/twisted/python/dist.py	Thu Mar  3 19:44:09 2016
@@ -133,13 +133,6 @@
 
 
 def get_setup_args(**kw):
-    if 'plugins' in kw:
-        py_modules = []
-        for plg in kw['plugins']:
-            py_modules.append("twisted.plugins." + plg)
-        kw.setdefault('py_modules', []).extend(py_modules)
-        del kw['plugins']
-
     if 'cmdclass' not in kw:
         kw['cmdclass'] = {'build_scripts': build_scripts_twisted}
 
@@ -178,50 +171,6 @@
     return ns['version'].base()
 
 
-# Names that are excluded from globbing results:
-EXCLUDE_NAMES = ["{arch}", "CVS", ".cvsignore", "_darcs",
-                 "RCS", "SCCS", ".svn"]
-EXCLUDE_PATTERNS = ["*.py[cdo]", "*.s[ol]", ".#*", "*~", "*.py", "*.cache",
-                    "*.old"]
-
-
-def _filterNames(names):
-    """
-    Given a list of file names, return those names that should be copied.
-    """
-    names = [n for n in names
-             if n not in EXCLUDE_NAMES]
-    # This is needed when building a distro from a working
-    # copy (likely a checkout) rather than a pristine export:
-    for pattern in EXCLUDE_PATTERNS:
-        names = [n for n in names
-                 if (not fnmatch.fnmatch(n, pattern))
-                 and (not n.endswith('.py'))]
-    return names
-
-
-def relativeTo(base, relativee):
-    """
-    Gets 'relativee' relative to 'basepath'.
-
-    i.e.,
-
-    >>> relativeTo('/home/', '/home/radix/')
-    'radix'
-    >>> relativeTo('.', '/home/radix/Projects/Twisted') # curdir is /home/radix
-    'Projects/Twisted'
-
-    The 'relativee' must be a child of 'basepath'.
-    """
-    basepath = os.path.abspath(base)
-    relativee = os.path.abspath(relativee)
-    if relativee.startswith(basepath):
-        relative = relativee[len(basepath):]
-        if relative.startswith(os.sep):
-            relative = relative[1:]
-        return os.path.join(base, relative)
-    raise ValueError("%s is not a subpath of %s" % (relativee, basepath))
-
 
 def getExtensions():
     """
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.