예제 #1
0
파일: setup.py 프로젝트: nissimk/ipython
    ]

    def initialize_options(self):
        upload.initialize_options(self)
        meta = self.distribution.metadata
        base = '{name}-{version}'.format(name=meta.get_name(),
                                         version=meta.get_version())
        self.files = os.path.join('dist', '%s.*.exe' % base)

    def run(self):
        for dist_file in glob(self.files):
            self.upload_file('bdist_wininst', 'any', dist_file)


setup_args['cmdclass'] = {
    'build_py': record_commit_info('IPython'),
    'sdist': record_commit_info('IPython', sdist),
    'upload_wininst': UploadWindowsInstallers,
}

#---------------------------------------------------------------------------
# Handle scripts, dependencies, and setuptools specific things
#---------------------------------------------------------------------------

# For some commands, use setuptools.  Note that we do NOT list install here!
# If you want a setuptools-enhanced install, just run 'setupegg.py install'
needs_setuptools = set((
    'develop',
    'release',
    'bdist_egg',
    'bdist_rpm',
예제 #2
0
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
               ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
            print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
            sys.exit(1)
        setup_args['scripts'] = [pjoin('scripts','ipython_win_post_install.py')]
else:
    # If we are running without setuptools, call this function which will
    # check for dependencies an inform the user what is needed.  This is
    # just to make life easy for users.
    check_for_dependencies()
    setup_args['scripts'] = find_scripts(False)

#---------------------------------------------------------------------------
# Do the actual setup now
#---------------------------------------------------------------------------

setup_args['cmdclass'] = {'build_py': record_commit_info('IPython')}
setup_args['packages'] = packages
setup_args['package_data'] = package_data
setup_args['data_files'] = data_files
setup_args.update(setuptools_extra_args)


if __name__ == '__main__':
    setup(**setup_args)
    cleanup()
예제 #3
0
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
               ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
            print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
            sys.exit(1)
        setup_args['scripts'] = [
            pjoin('scripts', 'ipython_win_post_install.py')
        ]
else:
    # If we are running without setuptools, call this function which will
    # check for dependencies an inform the user what is needed.  This is
    # just to make life easy for users.
    check_for_dependencies()
    setup_args['scripts'] = find_scripts(False)

#---------------------------------------------------------------------------
# Do the actual setup now
#---------------------------------------------------------------------------

setup_args['cmdclass'] = {'build_py': record_commit_info('IPython')}
setup_args['packages'] = packages
setup_args['package_data'] = package_data
setup_args['data_files'] = data_files
setup_args.update(setuptools_extra_args)

if __name__ == '__main__':
    setup(**setup_args)
    cleanup()
예제 #4
0
파일: setup.py 프로젝트: navit/ipython
    ]
    def initialize_options(self):
        upload.initialize_options(self)
        meta = self.distribution.metadata
        base = '{name}-{version}'.format(
            name=meta.get_name(),
            version=meta.get_version()
        )
        self.files = os.path.join('dist', '%s.*.exe' % base)
    
    def run(self):
        for dist_file in glob(self.files):
            self.upload_file('bdist_wininst', 'any', dist_file)

setup_args['cmdclass'] = {
    'build_py': record_commit_info('IPython'),
    'sdist' : record_commit_info('IPython', sdist),
    'upload_wininst' : UploadWindowsInstallers,
}

#---------------------------------------------------------------------------
# Handle scripts, dependencies, and setuptools specific things
#---------------------------------------------------------------------------

# For some commands, use setuptools.  Note that we do NOT list install here!
# If you want a setuptools-enhanced install, just run 'setupegg.py install'
needs_setuptools = set(('develop', 'release', 'bdist_egg', 'bdist_rpm',
           'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info',
           'egg_info', 'easy_install', 'upload',
            ))
if sys.platform == 'win32':
예제 #5
0
from setuptools import setup
from setuptools.command.build_py import build_py

from setupbase import (
    setup_args,
    find_scripts,
    find_packages,
    find_package_data,
    record_commit_info,
)

setup_args['entry_points'] = find_scripts(True, suffix='3')
setup_args['packages'] = find_packages()
setup_args['package_data'] = find_package_data()
setup_args['cmdclass'] = {
    'build_py': record_commit_info('IPython', build_cmd=build_py)
}

# Script to be run by the windows binary installer after the default setup
# routine, to add shortcuts and similar windows-only things.  Windows
# post-install scripts MUST reside in the scripts/ dir, otherwise distutils
# doesn't find them.
if 'bdist_wininst' in sys.argv:
    if len(sys.argv) > 2 and \
           ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
        print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
        sys.exit(1)
    setup_args['scripts'] = [
        os.path.join('scripts', 'ipython_win_post_install.py')
    ]
    setup_args['options'] = {
예제 #6
0
파일: setup.py 프로젝트: nialloc/ipython
    description = "Upload Windows installers to PyPI (only used from tools/release_windows.py)"
    user_options = upload.user_options + [("files=", "f", "exe file (or glob) to upload")]

    def initialize_options(self):
        upload.initialize_options(self)
        meta = self.distribution.metadata
        base = "{name}-{version}".format(name=meta.get_name(), version=meta.get_version())
        self.files = os.path.join("dist", "%s.*.exe" % base)

    def run(self):
        for dist_file in glob(self.files):
            self.upload_file("bdist_wininst", "any", dist_file)


setup_args["cmdclass"] = {
    "build_py": record_commit_info("IPython"),
    "sdist": record_commit_info("IPython", sdist),
    "upload_wininst": UploadWindowsInstallers,
}

# ---------------------------------------------------------------------------
# Handle scripts, dependencies, and setuptools specific things
# ---------------------------------------------------------------------------

# For some commands, use setuptools.  Note that we do NOT list install here!
# If you want a setuptools-enhanced install, just run 'setupegg.py install'
needs_setuptools = set(
    (
        "develop",
        "release",
        "bdist_egg",
예제 #7
0
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if "bdist_wininst" in sys.argv:
        if len(sys.argv) > 2 and ("sdist" in sys.argv or "bdist_rpm" in sys.argv):
            print("ERROR: bdist_wininst must be run alone. Exiting.", file=sys.stderr)
            sys.exit(1)
        setup_args["scripts"] = [pjoin("scripts", "ipython_win_post_install.py")]
        setup_args["options"] = {"bdist_wininst": {"install_script": "ipython_win_post_install.py"}}
else:
    # If we are running without setuptools, call this function which will
    # check for dependencies an inform the user what is needed.  This is
    # just to make life easy for users.
    check_for_dependencies()
    setup_args["scripts"] = find_scripts(False)

# ---------------------------------------------------------------------------
# Do the actual setup now
# ---------------------------------------------------------------------------

setup_args["cmdclass"] = {"build_py": record_commit_info("IPython")}
setup_args["packages"] = packages
setup_args["package_data"] = package_data
setup_args["data_files"] = data_files
setup_args.update(setuptools_extra_args)


if __name__ == "__main__":
    setup(**setup_args)
    cleanup()