Ejemplo n.º 1
0
    def run(self):
        # this is already imported, but the import might have failed. If so, raise an ImportError now.
        from Cython.Build import cythonize

        # Make sure the compiled Cython files in the distribution are up-to-date
        cythonize(['voropy/_voro.pyx'])
        _sdist.run(self)
Ejemplo n.º 2
0
 def run (self):
     # Build C file
     if os.path.exists ("src/compizconfig.pyx"):
         from Cython.Compiler.Main import compile as cython_compile
         cython_compile ("src/compizconfig.pyx")
     # Run regular sdist
     _sdist.run (self)
Ejemplo n.º 3
0
 def run(self):
     # Make sure the compiled Cython files in the distribution are up-to-date
     from Cython.Build import cythonize
     cythonize(plan_sources)
     cythonize(sparsity_sources, language="c++")
     cythonize(computeind_sources)
     _sdist.run(self)
Ejemplo n.º 4
0
 def run(self):
     for pyxfile in self._pyxfiles:
         cfile = pyxfile[:-3]+'c'
         msg = "C-source file '%s' not found."%(cfile)+\
         " Run 'setup.py cython' before sdist."
         assert os.path.isfile(cfile), msg
     sdist.run(self)
Ejemplo n.º 5
0
    def run(self):
        global VERSION
        global RELEASE

        # Create a development release string for later use
        git_head = subprocess.Popen("git log -1 --pretty=format:%h",
                                    shell=True,
                                    stdout=subprocess.PIPE).communicate()[0].strip()
        date = time.strftime("%Y%m%d%H%M%S", time.gmtime())
        git_release = "%sgit%s" % (date, git_head)

        # Expand macros in oz.spec.in and create oz.spec
        spec_in = open('oz.spec.in', 'r')
        spec = open('oz.spec', 'w')
        for line in spec_in.xreadlines():
            if "@VERSION@" in line:
                line = line.replace("@VERSION@", VERSION)
            elif "@RELEASE@" in line:
                # If development release, include date+githash in %{release}
                if RELEASE.startswith('0'):
                    RELEASE += '.' + git_release
                line = line.replace("@RELEASE@", RELEASE)
            spec.write(line)
        spec_in.close()
        spec.close()

        # Run parent constructor
        _sdist.run(self)
Ejemplo n.º 6
0
    def run(self):
        update_version_py()
        # unless we update this, the sdist command will keep using the old
        version = get_version()
        update_ansible_version(version)
        dest_dir = "ansible/playbooks/files"
        extra_files = ["ansible/irma-ansible/irma-ansible.py"]
        for subproj in ["common", "frontend", "brain", "probe"]:
            subproj_archive = "{}-{}".format(subproj, version)
            subproj_archive_path = os.path.join(dest_dir, subproj_archive)
            print("Packaging {}.zip".format(subproj_archive))
            extra_files.append(subproj_archive_path + ".zip")
            shutil.make_archive(subproj_archive_path, "zip", root_dir=subproj)

        webui_archive = "core-webui-{}".format(version)
        webui_archive_path = os.path.join(dest_dir, webui_archive)
        print("Packaging {}.zip".format(webui_archive))
        # webui dist is generated in
        # root_folder/frontend/web/dist
        if os.path.exists("frontend/web/dist"):
            extra_files.append(webui_archive_path + ".zip")
            shutil.make_archive(webui_archive_path, "zip",
                                base_dir="frontend/web/dist")
        self._create_manifest_git()
        self._append_manifest(extra_files)
        self.distribution.metadata.version = version
        _sdist.run(self)
        return
Ejemplo n.º 7
0
 def run(self):
     sdist.run(self)
     gpg_args = [
         'gpg', '--armor', '--sign', '--detach-sig', self.archive_files[0]]
     gpg = subprocess.Popen(
         gpg_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     gpg.communicate()
Ejemplo n.º 8
0
    def run(self):
        print('Updating version from git.')

        if call('tools/update_version.sh', shell=True):
            print('Error updating version.')
        else:
            sdist.run(self)
Ejemplo n.º 9
0
 def run(self):
     # Download images
     import imageio
     resource_dir = imageio.core.resource_dirs()[0]
     _set_crossplatform_resources(resource_dir)
     # Build as  normal
     sdist.run(self)
Ejemplo n.º 10
0
 def run(self):
     with open('version.rst', 'w') as f:
         f.write(':Version: %s\n' % __version__)
     shutil.copy('README.md', 'README.md')
     sdist.run(self)
     os.unlink('README.md')
     os.unlink('version.rst')
Ejemplo n.º 11
0
    def run(self):
        global VERSION
        global RELEASE

        # Create a development release string for later use
        git_head = subprocess.Popen("git log -1 --pretty=format:%h",
                                    shell=True,
                                    stdout=subprocess.PIPE).communicate()[0].strip()
        date = time.strftime("%Y%m%d%H%M%S", time.gmtime())
        git_release = "%sgit%s" % (date, git_head)

        # Expand macros in imagefactory.spec.in
        spec_in = open('imagefactory.spec.in', 'r')
        spec = open('imagefactory.spec', 'w')
        for line in spec_in.xreadlines():
            if "@VERSION@" in line:
                line = line.replace("@VERSION@", VERSION)
            elif "@RELEASE@" in line:
                # If development release, include date+githash in %{release}
                if RELEASE.startswith('0'):
                    RELEASE += '.' + git_release
                line = line.replace("@RELEASE@", RELEASE)
            spec.write(line)
        spec_in.close()
        spec.close()

        # Create Version.py to allow internal version repording via the API
        version_out = open("imgfac/Version.py", 'w')
        version_out.write('VERSION = "%s-%s"\n' % (VERSION, RELEASE))
        version_out.close()

        # Run parent constructor
        _sdist.run(self)
Ejemplo n.º 12
0
 def run(self):
     # Make sure the compiled Cython files in the distribution are up-to-date
     from Cython.Build import cythonize
     cythonize(['_pysndfile.pyx'])
     shutil.move("setup.cfg", "setup.cfg.default")
     shutil.copy2("setup.cfg.dist", "setup.cfg")
     sdist.run(self)
     shutil.move("setup.cfg.default", "setup.cfg")
Ejemplo n.º 13
0
 def run(self):
     with open('version.rst', 'w') as f:
         f.write(':Version: %s\n' % __version__)
     shutil.copy('%s/README.rst' % DIR, 'README')
     sdist.run(self)
     os.unlink('MANIFEST')
     os.unlink('README')
     os.unlink('version.rst')
Ejemplo n.º 14
0
    def run(self):
        sys.stdout.write("README.md --> README\n")
        shutil.copyfile("README.md", "README")

        sdist.run(self)

        sys.stdout.write("Cleaning up README\n")
        os.remove("README")
Ejemplo n.º 15
0
        def run(self):
            from Cython.Build import cythonize

            for ext in self.distribution.ext_modules:
                sources = list(s for s in ext.sources if s.endswith('.pyx'))
                cythonize(sources)

            sdist_.run(self)
Ejemplo n.º 16
0
 def run(self):
     try:
         from Cython.Build import cythonize
     except ImportError:
         raise Exception, "Cannot create source distribution without Cython."
     print "Cythonizing"
     extensions = cythonize(my_extensions)
     _sdist.run(self)
Ejemplo n.º 17
0
 def run(self):
     import mutagen
     if mutagen.version[-1] < 0:
         raise SystemExit(
             "Refusing to create a source distribution for a prerelease.")
     else:
         self.run_command("test")
         distutils_sdist.run(self)
Ejemplo n.º 18
0
    def run(self):
        # have to generate the cache of symlinks for release as sdist is the
        # only command that has access to symlinks from the git repo
        symlinks = {'script': _find_symlinks('bin'),
                    'library': _find_symlinks('lib', '.py'),
                    }
        _cache_symlinks(symlinks)

        SDist.run(self)
Ejemplo n.º 19
0
    def run(self):
        f1 = open("virt-manager.spec.in", "r")
        f2 = open("virt-manager.spec", "w")
        for line in f1:
            f2.write(line.replace("@VERSION@", CLIConfig.version))
        f1.close()
        f2.close()

        sdist.run(self)
Ejemplo n.º 20
0
 def run(self):
     cythonize(extensions)
     for ext in extensions:
         for src in ext.sources:
             if not os.path.exists(src):
                 raise Exception(
                     "Cython-generated file '{0}' not found. "
                     "Run 'python setup.py --usage' for details.".format(src, usage))
     sdist.run(self)
Ejemplo n.º 21
0
 def run(self):
     if "cython" in cmdclass:
         self.run_command("cython")
     else:
         for pyxfile in self._pyxfiles:
             cfile = pyxfile[:-3] + "c"
             msg = "C-source file '%s' not found." % (cfile) + " Run 'setup.py cython' before sdist."
             assert os.path.isfile(cfile), msg
     sdist.run(self)
Ejemplo n.º 22
0
    def run(self):
        cmd = (""" sed -e "s/::VERSION::/%s/g" < python-virtinst.spec.in """ %
               VERSION) + " > python-virtinst.spec"
        os.system(cmd)

        # Update and generate man pages
        self._update_manpages()

        sdist.run(self)
Ejemplo n.º 23
0
    def run(self):
        f1 = open('virt-manager.spec.in', 'r')
        f2 = open('virt-manager.spec', 'w')
        for line in f1:
            f2.write(line.replace('@VERSION@', CLIConfig.version))
        f1.close()
        f2.close()

        sdist.run(self)
Ejemplo n.º 24
0
 def run(self):
     if not self.unstable:
         version_file = 'hyperion/version.py'
         content = open(version_file, 'r').read()
         open(version_file, 'w').write(content.replace('__dev__ = True', "__dev__ = False"))
     try:
         sdist.run(self)
     finally:
         if not self.unstable:
             open(version_file, 'w').write(content)
Ejemplo n.º 25
0
 def run(self):
     shutil.copy('fiona/ogrext1.pyx', 'fiona/ogrext.pyx')
     _ = check_output(['cython', '-v', '-f', 'fiona/ogrext.pyx',
                       '-o', 'fiona/ogrext1.c'])
     print(_)
     shutil.copy('fiona/ogrext2.pyx', 'fiona/ogrext.pyx')
     _ = check_output(['cython', '-v', '-f', 'fiona/ogrext.pyx',
                       '-o', 'fiona/ogrext2.c'])
     print(_)
     sdist.run(self)
Ejemplo n.º 26
0
 def run(self):
     with open('version.rst', 'w') as f:
         f.write(':Version: %s\n' % __version__)
     shutil.copy('README.rst', 'README')
     subprocess.call(['rst2man', 'zk_watcher.rst', 'zk_watcher.1'])
     sdist.run(self)
     os.unlink('MANIFEST')
     os.unlink('README')
     os.unlink('zk_watcher.1')
     os.unlink('version.rst')
Ejemplo n.º 27
0
 def run(self):
     if 'cython' in cmdclass:
         self.run_command('cython')
     else:
         for pyxfile in self._pyxfiles:
             cfile = pyxfile[:-3] + 'c'
             cppfile = pyxfile[:-3] + 'cpp'
             msg = "C-source file '%s' not found. Run 'setup.py cython' " \
                   "before sdist." % cfile
             assert os.path.isfile(cfile) or os.path.isfile(cppfile), msg
     sdist.run(self)
Ejemplo n.º 28
0
 def run(self):
     inst = self.distribution.command_options.get('sdist')
     self.macsyview_link_name = 'macsyview'
     if not inst.has_key('macsyview_dir'):
         self.must_clean = False
         if not os.path.exists(self.macsyview_link_name):
             sys.exit('Missing mandatory macsyview-dir to specify the location of macsyview project')
     else:
         self.set_up()
     sdist.run(self)
     self.clean_up()
 def run(self):
     self.run_command('fetch_libzmq')
     if 'cython' in cmdclass:
         self.run_command('cython')
     else:
         for pyxfile in self._pyxfiles:
             cfile = pyxfile[:-3]+'c'
             msg = "C-source file '%s' not found."%(cfile)+\
             " Run 'setup.py cython' before sdist."
             assert os.path.isfile(cfile), msg
     sdist.run(self)
Ejemplo n.º 30
0
 def run(self):
     print "creating VERSION file"
     if os.path.exists('VERSION'):
         os.remove('VERSION')
     version = get_version()
     version_file = open('VERSION', 'w')
     version_file.write(version)
     version_file.close()
     sdist.run(self)
     print "removing VERSION file"
     if os.path.exists('VERSION'):
         os.remove('VERSION')
Ejemplo n.º 31
0
 def run(self):
     fix_dist()
     sdist_class.run(self)
Ejemplo n.º 32
0
 def run(self):
     self.force_manifest = 1
     if (sys.platform != "win32" and os.path.isdir('.git')):
         assert os.system("git rev-parse --verify HEAD > .gitrev") == 0
     sdist_orig.run(self)
Ejemplo n.º 33
0
 def run(self):
     warn(
         "WARNING: Usually, arandr's source tarballs are generated from `git archive`!"
     )
     _sdist.run(self)
Ejemplo n.º 34
0
 def run(self):
     # generate the version file
     generate_version_py()
     generate_primitives_h()
     sdist.run(self)
Ejemplo n.º 35
0
 def run(self):
     versions = get_versions(verbose=True)
     self._versioneer_generated_versions = versions
     # unless we update this, the command will keep using the old version
     self.distribution.metadata.version = versions["version"]
     return _sdist.run(self)
Ejemplo n.º 36
0
 def run(self):
     build_cython()
     sdist.run(self)
Ejemplo n.º 37
0
 def run(self):
     self.formats = ['zip']
     _sdist.run(self)
Ejemplo n.º 38
0
 def run(self):
     self.execute(_clean_bins, (), msg="Removing binaries")
     self.execute(_copy_sources, (), msg="Copying VEX sources")
     _sdist.run(self)
Ejemplo n.º 39
0
 def run(self):
     from Cython.Build import cythonize
     build_ext = self.reinitialize_command('build_ext')
     build_ext.ensure_finalized()
     cythonize(build_ext.extensions)
     dst_sdist.run(self)
Ejemplo n.º 40
0
 def run(self):
     self.run_command("epydoc")
     _sdist.run(self)
Ejemplo n.º 41
0
 def run(self):
     os.system('python setup.py build')
     sdist.run(self)
Ejemplo n.º 42
0
 def run(self):
     clean_bins()
     copy_sources()
     return sdist.run(self)
Ejemplo n.º 43
0
 def run(self):
     check_submodules()
     with concat_license_files():
         sdist.run(self)
Ejemplo n.º 44
0
 def run(self):
     self.run_command('data')
     _sdist.run(self)
Ejemplo n.º 45
0
	def run(self):
		subprocess.call(['svn', 'up'])
		os.mkdir(self.distribution.get_fullname())
		subprocess.call(['svn2cl', '--authors', 'AUTHORS', '--output', self.distribution.get_fullname() + '/ChangeLog'])

		sdist.run(self)
Ejemplo n.º 46
0
 def run(self):
     update_version_py()
     # unless we update this, the sdist command will keep using the old
     # version
     self.distribution.metadata.version = get_version()
     return _sdist.run(self)
Ejemplo n.º 47
0
 def run(self):
     write_authors()
     du_sdist.run(self)
Ejemplo n.º 48
0
 def run(self):
     cmd = (""" sed -e "s/@VERSION@/%s/g" < imagefactory-plugins.spec.in """ % pkg_version) + " > imagefactory-plugins.spec"
     os.system(cmd)
     _sdist.run(self)
Ejemplo n.º 49
0
 def run(self):
     sdist.run(self)
     self._check_manifest()
     self._check_dist()
Ejemplo n.º 50
0
 def run(self):
     update_version()
     _sdist.run(self)
Ejemplo n.º 51
0
	def run(self):
		# Build generated code.
		generate(self.dry_run)

		# Call the super.
		sdist.run(self)
Ejemplo n.º 52
0
 def run(self):
     version = get_version()
     update_f_version(version)
     self.distribution.metadata.version = version
     return _sdist.run(self)
Ejemplo n.º 53
0
    def run(self):
        # Make sure the compiled Cython files in the distribution are up-to-date
        from Cython.Build import cythonize

        cythonize(["mergesvvcf/*.pyx"])
        _sdist.run(self)
Ejemplo n.º 54
0
 def run(self):
     # if prebuilt libraries are existent, then do not copy source
     if os.path.exists(PATH_LIB64) and os.path.exists(PATH_LIB32):
         return sdist.run(self)
     copy_sources()
     return sdist.run(self)
Ejemplo n.º 55
0
 def run(self):
     # Make sure the compiled Cython files in the distribution are up-to-date
     from Cython.Build import cythonize
     print("cythonizing...")
     cythonize(['cython/mycythonmodule.pyx'])
     _sdist.run(self)
Ejemplo n.º 56
0
    def run(self):
        # Build the .mo files
        subprocess.check_call(['make', '-C', 'po'])

        # Run the parent command
        sdist.run(self)
Ejemplo n.º 57
0
 def run(self):
     check_submodules()
     sdist.run(self)
Ejemplo n.º 58
0
    def run(self):
        cmd = (""" sed -e "s/@VERSION@/%s/g" < imagefactory.spec.in """ %
               VERSION) + " > imagefactory.spec"
        os.system(cmd)

        _sdist.run(self)
Ejemplo n.º 59
0
  def run (self):

    self.run_command('build_ext')
    _sdist.run(self)
Ejemplo n.º 60
0
 def run(self):
     log.info('running custom_sdist')
     sdist.run(self)