def setup(**attrs): HOME_DIR = str(Path.home()) PIPTUI_DIR = HOME_DIR + '/.piptui/' THEME_FOLDER = PIPTUI_DIR + 'themes/' if not os.path.isdir(PIPTUI_DIR): os.mkdir(PIPTUI_DIR) if not os.path.isdir(THEME_FOLDER): os.mkdir(THEME_FOLDER) with open('.piptui/config.ini') as original: with open(PIPTUI_DIR + 'config.ini', 'w') as new: new.write(original.read()) for file in os.listdir('.piptui/themes'): with open('.piptui/themes/' + file) as original: with open(THEME_FOLDER + file, 'w') as new: new.write(original.read()) _install_setup_requires(attrs) return distutils.core.setup(**attrs)
# -*- coding: utf-8 -*- import setuptools setuptools._install_setup_requires({'setup_requires': ['git-versiointi']}) from versiointi import asennustiedot setuptools.setup( name='testarossa', description='Oikopolkuja Python-yksikkötestautukseen', url='https://github.org/an7oine/testarossa', author='Antti Hautaniemi', author_email='*****@*****.**', packages=setuptools.find_packages(), include_package_data=True, zip_safe=False, **asennustiedot(__file__), )
from setuptools import setup import setuptools # gitpython is needed for version tagging setuptools._install_setup_requires({"setup_requires": "gitpython"}) import git #noqa # get the description from README.md with open("README.md", 'r') as readme: long_description = readme.read() # get the version from git def get_version(): repo = git.Repo(search_parent_directories=True) if repo.tags: # get the latest tag latest_tag = sorted(repo.tags, key=lambda t: t.commit.committed_date, reverse=True)[0] # check if the latest commit is a release if repo.head.commit.hexsha == latest_tag.commit.hexsha: # just return the release tag return latest_tag.name else: # get amount of commits since the last tag as pre-release commit_count_since_latest_tag = len( list(repo.iter_commits( max_age=latest_tag.commit.authored_date))) - 1 # return a pre-release tag
pep386=default_version, short=default_version, long=default_version, date=default_version_date, dirty=True, commit='', post='-1' ) relic.release.write_template(version, os.path.join(*PACKAGENAME.split('.'))) # Install packages required for this setup to proceed: SETUP_REQUIRES = [ 'numpy', ] _install_setup_requires(dict(setup_requires=SETUP_REQUIRES)) for dep_pkg in SETUP_REQUIRES: try: importlib.import_module(dep_pkg) except ImportError: print("{0} is required in order to install '{1}'.\n" "Please install {0} first.".format(dep_pkg, PACKAGENAME), file=sys.stderr) exit(1) def get_transforms_data(): # Installs the schema files in jwst/transforms # Because the path to the schemas includes "stsci.edu" they # can't be installed using setuptools. transforms_schemas = []
define_macros += [ ('_CRT_SECURE_NO_WARNING', None), ('__STDC__', 1) ] # Deprecation warning: # Pandokia integration will be removed in a later release. if pandokia: fctx_includes = [os.path.join(os.path.dirname(pandokia.__file__), 'runners', 'maker')] include_dirs.extend(fctx_includes) # Due to overriding `install` and `build_sphinx` we need to download # setup_requires dependencies before reaching `setup()`. This allows # `sphinx` to exist before the `BuildSphinx` class is injected. _install_setup_requires(dict(setup_requires=SETUP_REQUIRES)) # Distribute compiled documentation alongside the installed package docs_compiled_src = os.path.normpath('build/sphinx/html') docs_compiled_dest = os.path.normpath('{0}/htmlhelp'.format(NAME)) class InstallCommand(install): """Ensure drizzlepac's C extensions are available when imported relative to the documentation, instead of relying on `site-packages`. What comes from `site-packages` may not be the same drizzlepac that was *just* compiled. """ def run(self): build_cmd = self.reinitialize_command('build_ext') build_cmd.inplace = 1
def setup(**attrs): _install_setup_requires(attrs) return distutils.core.setup(**attrs)
from setuptools import setup, Extension, _install_setup_requires REQUIRES = ['setuptools>=18.0', 'cython>=0.29'] _install_setup_requires({'setup_requires': REQUIRES}) from Cython.Build import cythonize setup(name='cyuuid', version='0.1.1', author='martin.asell', description='Cython implementation of RFC4122', long_description=open('README.md').read(), long_description_content_type='text/markdown', install_requires=REQUIRES, setup_requires=REQUIRES, license='PSF', url='https://github.com/masell/cyuuid/', packages=[ 'cyuuid', ], ext_modules=cythonize(Extension('cyuuid.*', sources=["cyuuid/*.pyx"])), include_package_data=True, zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: Python Software Foundation License', 'Programming Language :: Python :: 3.6', 'Programming Language :: Cython', 'Intended Audience :: Developers', ])