예제 #1
0
파일: test_egg.py 프로젝트: manahl/pkglib
    def finalize_options(self):

        # Where the tests are found
        dist = self.distribution
        self.test_dir = os.path.join(os.getcwd(), "tests")

        # Where in the build tree they're going
        build_py = self.get_finalized_command("build_py")
        self.build_lib = build_py.build_lib
        self.dest_dir = os.path.join(
            self.build_lib, CONFIG.test_egg_namespace, dist.get_name().replace(".", os.path.sep)
        )

        # This stops the regular bdist builder from triggering, allowing us to
        # craft our own package underneath the regular build tree
        self.skip_build = True

        # Adjust the package metadata to suit our test package
        self.old_name = dist.metadata.name
        dist.metadata.name = "test.%s" % self.old_name
        dist.namespace_packages = [CONFIG.test_egg_namespace] + [
            "%s.%s" % (CONFIG.test_egg_namespace, i) for i in dist.namespace_packages
        ]
        dist.entry_points = {}

        # Set the install requirements to be the test requirements of the
        # original, plus a direct pin to the original version.
        self.old_version = self.get_finalized_command("egg_info").egg_version
        dist.install_requires = dist.tests_require + ["%s==%s" % (self.old_name, self.old_version)]
        _bdist_egg.finalize_options(self)
예제 #2
0
    def finalize_options(self):
        from path import path

        # Where the tests are found
        self.test_dir = path.getcwd() / 'tests'

        # Where in the build tree they're going
        build_py = self.get_finalized_command('build_py')
        self.build_lib = path(build_py.build_lib)
        self.dest_dir = self.build_lib / CONFIG.test_egg_namespace / \
                            (self.distribution.get_name().replace('.', '/'))

        # This stops the regular bdist builder from triggering, allowing us to
        # craft our own package underneath the regular build tree
        self.skip_build = True

        # Adjust the package metadata to suit our test package
        self.old_name = self.distribution.metadata.name
        self.distribution.metadata.name = 'test.%s' % self.distribution.metadata.name
        self.distribution.namespace_packages = [CONFIG.test_egg_namespace] + \
                                               ['%s.%s' % (CONFIG.test_egg_namespace, i) for i in
                                                           self.distribution.namespace_packages]
        self.distribution.entry_points = {}

        # Set the install requirements to be the test requirements of the original,
        # plus a direct pin to the original version.
        self.old_version = self.get_finalized_command('egg_info').egg_version
        self.distribution.install_requires = self.distribution.tests_require + \
                                            ['%s==%s' % (self.old_name, self.old_version)]
        _bdist_egg.finalize_options(self)
예제 #3
0
    def finalize_options(self):

        # Where the tests are found
        dist = self.distribution
        self.test_dir = os.path.join(os.getcwd(), 'tests')

        # Where in the build tree they're going
        build_py = self.get_finalized_command('build_py')
        self.build_lib = build_py.build_lib
        self.dest_dir = os.path.join(self.build_lib, CONFIG.test_egg_namespace,
                                     dist.get_name().replace('.', os.path.sep))

        # This stops the regular bdist builder from triggering, allowing us to
        # craft our own package underneath the regular build tree
        self.skip_build = True

        # Adjust the package metadata to suit our test package
        self.old_name = dist.metadata.name
        dist.metadata.name = 'test.%s' % self.old_name
        dist.namespace_packages = ([CONFIG.test_egg_namespace] + [
            '%s.%s' % (CONFIG.test_egg_namespace, i)
            for i in dist.namespace_packages
        ])
        dist.entry_points = {}

        # Set the install requirements to be the test requirements of the
        # original, plus a direct pin to the original version.
        self.old_version = self.get_finalized_command('egg_info').egg_version
        dist.install_requires = (
            dist.tests_require +
            ['%s==%s' % (self.old_name, self.old_version)])
        _bdist_egg.finalize_options(self)
예제 #4
0
    def finalize_options(self):
        orig_bdist_egg.finalize_options(self)

        # Redo the calculation of the egg's filename since we always have
        # extension modules, but they are not built by setuptools so it
        # doesn't know about them.
        from pkg_resources import Distribution
        from sysconfig import get_python_version
        basename = Distribution(None, None, self.ei_cmd.egg_name,
                                self.ei_cmd.egg_version, get_python_version(),
                                self.plat_name).egg_name()
        self.egg_output = os.path.join(self.dist_dir, basename + '.egg')
예제 #5
0
파일: setup.py 프로젝트: ssbb/Phoenix
 def finalize_options(self):
     orig_bdist_egg.finalize_options(self)
     
     # Redo the calculation of the egg's filename since we always have
     # extension modules, but they are not built by setuptools so it
     # doesn't know about them.
     from pkg_resources import Distribution
     from sysconfig import get_python_version
     basename = Distribution(
         None, None, self.ei_cmd.egg_name, self.ei_cmd.egg_version,
         get_python_version(),
         self.plat_name
     ).egg_name()
     self.egg_output = os.path.join(self.dist_dir, basename+'.egg')
예제 #6
0
    def finalize_options(self):
        old_bdist_egg.finalize_options(self)

        basename = "enstaller-{0}-1.egg".format(__version__)
        self.egg_output = os.path.join(self.dist_dir, basename)
예제 #7
0
 def finalize_options(self):
     bdist_egg.finalize_options(self)
     self.distribution.build_egg = True
     if not self.skip_build:
         self.run_command("build")
예제 #8
0
파일: bdist_egg.py 프로젝트: abadger/Bento
 def finalize_options(self):
     old_bdist_egg.finalize_options(self)