Пример #1
0
 def test_processDataFileList(self):
     """
     L{_processDataFileList} translates a list of files into a distutils
     friendly format.
     """
     result = _processDataFileList(["foo.bar", "foo.baz.bar",
                                    "foo.z", "baz.spam"])
     self.assertIn(("foo", [os.path.sep.join(["foo", "bar.py"]),
                            os.path.sep.join(["foo", "z.py"])]),
                   result)
     self.assertIn((os.path.sep.join(["foo", "baz"]),
                    [os.path.sep.join(["foo", "baz", "bar.py"])]),
                   result)
     self.assertIn(("baz", [os.path.sep.join(["baz", "spam.py"])]),
                   result)
Пример #2
0
 def test_processDataFileList(self):
     """
     L{_processDataFileList} translates a list of files into a distutils
     friendly format.
     """
     result = _processDataFileList(
         ["foo.bar", "foo.baz.bar", "foo.z", "baz.spam"])
     self.assertIn(("foo", [
         os.path.sep.join(["foo", "bar.py"]),
         os.path.sep.join(["foo", "z.py"])
     ]), result)
     self.assertIn((os.path.sep.join(
         ["foo", "baz"]), [os.path.sep.join(["foo", "baz", "bar.py"])]),
                   result)
     self.assertIn(("baz", [os.path.sep.join(["baz", "spam.py"])]), result)
Пример #3
0
def main():
    from setuptools import setup

    # Make sure the to-be-installed version of Twisted is used, if available,
    # since we're importing from it:
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    from twisted.python.dist3 import modulesToInstall
    from twisted.python.dist3 import testDataFiles, _processDataFileList
    from twisted.python.dist import STATIC_PACKAGE_METADATA, getDataFiles

    _dataFiles = _processDataFileList(testDataFiles)
    args = STATIC_PACKAGE_METADATA.copy()
    args['install_requires'] = ["zope.interface >= 4.0.2"]
    args['py_modules'] = modulesToInstall
    args['data_files'] = getDataFiles('twisted') + _dataFiles
    args['zip_safe'] = False
    args['cmdclass'] = {'sdist': DisabledSdist}
    args['scripts'] = ['bin/trial', 'bin/twistd']

    setup(**args)
Пример #4
0
def main():
    from setuptools import setup

    # Make sure the to-be-installed version of Twisted is used, if available,
    # since we're importing from it:
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    from twisted.python.dist3 import modulesToInstall
    from twisted.python.dist3 import testDataFiles, _processDataFileList
    from twisted.python.dist import STATIC_PACKAGE_METADATA, getDataFiles

    _dataFiles = _processDataFileList(testDataFiles)
    args = STATIC_PACKAGE_METADATA.copy()
    args['install_requires'] = ["zope.interface >= 4.0.2"]
    args['py_modules'] = modulesToInstall
    args['data_files'] = getDataFiles('twisted') + _dataFiles
    args['zip_safe'] = False
    args['cmdclass'] = {'sdist': DisabledSdist}
    args['scripts'] = ['bin/trial']

    setup(**args)