def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme["data"] = scheme["purelib"] dist = setup( name=name, version=version, description=desc, long_description=long_desc, classifiers=classifiers, author=author, author_email=author_email, url=url, license=cp_license, packages=packages, download_url=download_url, data_files=data_files, scripts=[os.path.join("cherrypy", "cherryd")], )
def main(): "Main function" version = skl_version name = "Skeletons" description = "Skeletons description" url = "Skeletons URL" readme = "Skeletons readme" author = "Valentin Kuznetsov", author_email = "<Valentin Kuznetsov email [dot] com>", keywords = ["Skeletons"] package_dir = {'Skeletons': 'python/Skeletons'} packages = find_packages('python') extentions = [] # list your extensions here data_files = [] # list of tuples whose entries are (dir, [data_files]) data_files = [(install_prefix('etc'), datafiles('etc')), (install_prefix('scripts'), datafiles('scripts')) ] cms_license = "Skeletons license" classifiers = [ "Development Status :: 3 - Production/Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Skeletons License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: General" ] if sys.version < required_python_version: msg = "I'm sorry, but %s %s requires Python %s or later." print msg % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)'], classifiers = classifiers, ext_modules = extentions, cmdclass = {'test': TestCommand, 'clean': CleanCommand, 'doc': DocCommand}, author = author, author_email = author_email, url = url, license = cms_license, )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print(s % (name, version, required_python_version)) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in list(INSTALL_SCHEMES.values()): scheme['data'] = scheme['purelib'] setup( name=name, version=version, description=desc, long_description=long_desc, classifiers=classifiers, author=author, author_email=author_email, url=url, license=cp_license, packages=packages, data_files=data_files, scripts=scripts, cmdclass=cmd_class, )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] dist = setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)', 'sphinx (>=1.0.4)', 'Cheetah (>=2.4)', 'cherrypy (>=3.1.2)'], classifiers = classifiers, cmdclass = {'test': TestCommand, 'clean': CleanCommand}, author = author, author_email = author_email, url = url, license = license, )
def install_data_files_hack(): # This is a clever hack to circumvent distutil's data_files # policy "install once, find never". Definitely a TODO! # -- https://groups.google.com/group/comp.lang.python/msg/2105ee4d9e8042cb from distutils.command.install import INSTALL_SCHEMES for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib']
def main(): """Main routine""" if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] dist = setup( name = name, version = version, description = desc, long_description = readme, keywords = keywords, # package_dir = {"":'pyquerybuilder'}, packages = packages, package_data = package_data, # data_files = data_files, include_package_data = True, install_requires = requirements, # scripts = scriptfiles, classifiers = classifiers, author = author, author_email = author_email, url = url, license = license, )
def main(): "Main function" version = t0_version name = "T0" description = "CMS T0 System" url = \ "https://twiki.cern.ch/twiki/bin/viewauth/CMS/T0ASTDevelopmentPlan" readme = "T0 CMS system %s" % url author = "Dirk Hufnagel", author_email = "Dirk.Hufnagel [at] cern.ch>", keywords = ["T0"] package_dir = \ {"T0": "src/python/T0", "T0Component": "src/python/T0Component"} packages = find_packages('src/python') scriptfiles = [] # list of scripts data_files = [] # list of tuples whose entries are (dir, [data_files]) data_files = [(install_prefix('etc'), datafiles('etc', recursive=False)), (install_prefix('bin'), datafiles('bin', recursive=False))] cms_license = "CMS experiment software" classifiers = [ "Development Status :: 3 - Production/Beta", "Intended Audience :: Developers", "License :: OSI Approved :: CMS/CERN Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Database" ] if sys.version < required_python_version: msg = "I'm sorry, but %s %s requires Python %s or later." print(msg % (name, version, required_python_version)) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = scriptfiles, requires = ['python (>=2.6)'], classifiers = classifiers, cmdclass = {'test': TestCommand, 'clean': CleanCommand}, author = author, author_email = author_email, url = url, license = cms_license, )
def main(): "Main function" version = cc_version name = "CRABClient" description = "CMS CRAB Client" url = \ "https://twiki.cern.ch/twiki/bin/viewauth/CMS/RunningCRAB3" readme = "CRAB Client %s" % url author = "", author_email = "", keywords = ["CRABClient"] package_dir = \ {"CRABClient": "src/python/CRABClient"} packages = find_packages('src/python') data_files = [] # list of tuples whose entries are (dir, [data_files]) cms_license = "CMS experiment software" classifiers = [ "Development Status :: 3 - Production/Beta", "Intended Audience :: Developers", "License :: OSI Approved :: CMS/CERN Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Scientific/Engineering" ] if sys.version < required_python_version: msg = "I'm sorry, but %s %s requires Python %s or later." print msg % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)'], classifiers = classifiers, cmdclass = {'test': TestCommand, 'clean': CleanCommand}, author = author, author_email = author_email, url = url, license = cms_license, )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print(s % (name, version, required_python_version)) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in list(INSTALL_SCHEMES.values()): scheme['data'] = scheme['purelib'] setup(**setup_params)
def main(): "Main function" version = dp_version name = "DataProvider" description = "CMS DataProvider generates CMS meta-data, e.g. DBS/Phedex" url = "" readme = "DataProvider package %s" % url author = "Valentin Kuznetsov", author_email = "vkuznet [at] gmail [dot] com>", keywords = ["DataProvider"] package_dir = {'DataProvider': 'src/python/DataProvider'} packages = find_packages('src/python') data_files = [] # list of tuples whose entries are (dir, [data_files]) cms_license = "CMS experiment software" classifiers = [ "Development Status :: 3 - Production/Beta", "Intended Audience :: Developers", "License :: OSI Approved :: CMS/CERN Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Database" ] if sys.version < required_python_version: msg = "I'm sorry, but %s %s requires Python %s or later." print msg % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)'], classifiers = classifiers, cmdclass = {'test': TestCommand, 'clean': CleanCommand, 'doc': DocCommand}, author = author, author_email = author_email, url = url, license = cms_license, )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] dist = setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)', 'pymongo (>=1.6)', 'ply (>=3.3)', 'sphinx (>=1.0.4)', 'cherrypy (>=3.1.2)', 'Cheetah (>=2.4)', 'yaml (>=3.09)', # keyword search 'nltk', 'jsonpath_rw'], ext_modules = [Extension('DAS.extensions.das_speed_utils', include_dirs=['extensions'], sources=['src/python/DAS/extensions/dict_handler.c']), Extension('DAS.extensions.das_hash', include_dirs=['extensions'], sources=['src/python/DAS/extensions/das_hash.c']), # fast_recursive_ranker is based on cython, but # is distributed as .c source # .pyx->.c to be compiled separately # so cython is not required for installation Extension('DAS.extensions.fast_recursive_ranker', sources=['src/python/DAS/extensions/fast_recursive_ranker.c'])], classifiers = classifiers, cmdclass = {'build_ext': BuildExtCommand, 'test': TestCommand, 'doc': DocCommand, 'clean': CleanCommand}, author = author, author_email = author_email, url = url, license = license, )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] dist = setup( name=name, version=version, description="Python Commons", long_description="Utility code.", author="Tim Watson", author_email="*****@*****.**", url="http://github.com/n0gg1n/commons", license="BSD", packages=['commons'], download_url="http://github.com/n0gg1n/badrabbit", data_files=[('commons',['INSTALL', 'LICENSE', 'README'])] )
def main(): if sys.version < required_python_version: s = "I'm sorry, but %s %s requires Python %s or later." print s % (name, version, required_python_version) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] dist = setup( name = name, version = version, description = description, long_description = readme, keywords = keywords, packages = packages, package_dir = package_dir, data_files = data_files, scripts = datafiles('bin'), requires = ['python (>=2.6)', 'pymongo (>=1.6)', 'ply (>=3.3)', 'sphinx (>=1.0.4)', 'cherrypy (>=3.1.2)', 'Cheetah (>=2.4)', 'yaml (>=3.09)'], ext_modules = [Extension('DAS.extensions.das_speed_utils', include_dirs=['extensions'], sources=['src/python/DAS/extensions/dict_handler.c'])], classifiers = classifiers, cmdclass = {'build_ext': BuildExtCommand, 'test': TestCommand, 'doc': DocCommand, 'clean': CleanCommand}, author = author, author_email = author_email, url = url, license = license, )
# Not storing templates in python eggs 'pkg_resources', 'resource', # Not using the python interactive interpreter 'IPython', # Not sure where django references these... 'crypt', # Not using SSL 'OpenSSL', # Not needed to include frePPLe's own python interface 'frepple', ] # Collect all static files to be included in the distribution. # This includes our custom python code as well. from distutils.command.install import INSTALL_SCHEMES for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] data_files = [] for srcdir, targetdir in [ (os.path.join(djangodirectory,'contrib','admin','templates'), 'templates'), (os.path.join(djangodirectory,'contrib','admin','static'), 'static'), (os.path.join(djangodirectory,'conf','locale'), os.path.join('locale','django')), (os.path.join(djangodirectory,'contrib','auth','locale'), os.path.join('locale','auth')), (os.path.join(djangodirectory,'contrib','contenttypes','locale'), os.path.join('locale','contenttypes')), (os.path.join(djangodirectory,'contrib','sessions','locale'), os.path.join('locale','sessions')), (os.path.join(djangodirectory,'contrib','admin','locale'), os.path.join('locale','admin')), (os.path.join(djangodirectory,'contrib','messages','locale'), os.path.join('locale','messages')), (freppledirectory, os.path.join('custom','freppledb')), ]: root_path_length = len(srcdir) + 1 for dirpath, dirnames, filenames in os.walk(os.path.join(srcdir)): # Ignore dirnames that start with '.'
try: return open(os.path.join(root_dir, f), 'rb').read().decode('utf-8').strip() except IOError: return 'UNKNOWN' def list_data_files(d): data_files = [] for root, dirs, files in os.walk(os.path.join(root_dir, d)): path = root.replace(root_dir + os.sep, '', 1) if len(files) > 0: data_files.append((path, [os.path.join(path, f) for f in files])) return data_files # Tell distutils to put data_files in platform-specific installation for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] # Fix MacOS platform-specific lib dir class osx_install_data(install_data): def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self) if sys.platform == "darwin": cmdclasses = {'install_data': osx_install_data} else: cmdclasses = {'install_data': install_data} setup( name = 'django-pki', version=version,
os.chdir(root_dir) src_dir = 'kombu' def fullsplit(path, result=None): if result is None: result = [] head, tail = os.path.split(path) if head == '': return [tail] + result if head == path: return result return fullsplit(head, [tail] + result) for scheme in list(INSTALL_SCHEMES.values()): scheme['data'] = scheme['purelib'] for dirpath, dirnames, filenames in os.walk(src_dir): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] for filename in filenames: if filename.endswith('.py'): packages.append('.'.join(fullsplit(dirpath))) else: data_files.append( [dirpath, [os.path.join(dirpath, f) for f in filenames]], )
# You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """ To install MySQL Connector/Python: shell> python ./setup.py install """ from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES # Make sure that data files are actually installed in the package directory for install_scheme in INSTALL_SCHEMES.values(): install_scheme['data'] = install_scheme['purelib'] import setupinfo try: from cpyint import metasetupinfo setupinfo.command_classes.update(metasetupinfo.command_classes) except (ImportError, AttributeError): # python-internal not available pass setup( name=setupinfo.name, version=setupinfo.version, description=setupinfo.description, long_description=setupinfo.long_description,
platform-neutral way. """ if result is None: result = [] head, tail = os.path.split(path) if head == '': return [tail] + result if head == path: return result return fullsplit(head, [tail] + result) # Tell distutils not to put the data_files in platform-specific installation # locations. See here for an explanation: # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] # Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] root_dir = os.path.dirname(__file__) if root_dir != '': os.chdir(root_dir) geonode_dir = 'geonode' for dirpath, dirnames, filenames in os.walk(geonode_dir): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] if '__init__.py' in filenames:
os.chdir(root_dir) src_dir = 'kombu' def fullsplit(path, result=None): if result is None: result = [] head, tail = os.path.split(path) if head == '': return [tail] + result if head == path: return result return fullsplit(head, [tail] + result) for scheme in list(INSTALL_SCHEMES.values()): scheme['data'] = scheme['purelib'] for dirpath, dirnames, filenames in os.walk(src_dir): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] for filename in filenames: if filename.endswith('.py'): packages.append('.'.join(fullsplit(dirpath))) else: data_files.append( [dirpath, [os.path.join(dirpath, f) for f in filenames]], )
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ To install MySQL Connector/Python: shell> python ./setup.py install """ import sys from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES # Make sure that data files are actually installed in the package directory for install_scheme in INSTALL_SCHEMES.values(): install_scheme['data'] = install_scheme['purelib'] import metasetupinfo setup( name = metasetupinfo.name, version = metasetupinfo.version, description = metasetupinfo.description, long_description = metasetupinfo.long_description, author = metasetupinfo.author, author_email = metasetupinfo.author_email, license = metasetupinfo.license, keywords = metasetupinfo.keywords, url = metasetupinfo.url, download_url = metasetupinfo.download_url,
from distutils.command.install import INSTALL_SCHEMES from reviewboard import get_package_version, is_release, VERSION # Make sure we're actually in the directory containing setup.py. root_dir = os.path.dirname(__file__) if root_dir != "": os.chdir(root_dir) # Tell distutils to put the data_files in platform-specific installation # locations. See here for an explanation: # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb for scheme in INSTALL_SCHEMES.values(): scheme["data"] = scheme["purelib"] class osx_install_data(install_data): # On MacOS, the platform-specific lib dir is # /System/Library/Framework/Python/.../ # which is wrong. Python 2.5 supplied with MacOS 10.5 has an # Apple-specific fix for this in distutils.command.install_data#306. It # fixes install_lib but not install_data, which is why we roll our own # install_data class. def finalize_options(self): # By the time finalize_options is called, install.install_lib is # set to the fixed directory, so we set the installdir to install_lib. # The # install_data class uses ('install_data', 'install_dir') instead.
def main(): "Main function" version = cc_version name = "CRABClient" description = "CMS CRAB Client" url = \ "https://twiki.cern.ch/twiki/bin/viewauth/CMS/RunningCRAB3" readme = "CRAB Client %s" % url author = "", author_email = "", keywords = ["CRABClient"] package_dir = \ {"CRABClient": "src/python/CRABClient", "CRABAPI": "src/python/CRABAPI"} packages = find_packages('src/python') data_files = [('etc', [ 'doc/FullConfiguration.py', 'doc/ExampleConfiguration.py', 'etc/crab-bash-completion.sh', 'etc/init-light.sh', 'etc/init-light.csh', 'etc/init-light-pre.sh' ])] # list of tuples whose entries are (dir, [data_files]) cms_license = "CMS experiment software" classifiers = [ "Development Status :: 3 - Production/Beta", "Intended Audience :: Developers", "License :: OSI Approved :: CMS/CERN Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Scientific/Engineering" ] if sys.version < required_python_version: msg = "I'm sorry, but %s %s requires Python %s or later." print(msg % (name, version, required_python_version)) sys.exit(1) # set default location for "data_files" to # platform specific "site-packages" location for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name=name, version=version, description=description, long_description=readme, keywords=keywords, packages=packages, package_dir=package_dir, data_files=data_files, scripts=datafiles('bin'), requires=['python (>=2.6)'], classifiers=classifiers, cmdclass={ 'test': TestCommand, 'clean': CleanCommand }, author=author, author_email=author_email, url=url, license=cms_license, )