Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(self):
versions = versioneer.get_versions()
tempdir = tempfile.mkdtemp()
generated = os.path.join(tempdir, "rundemo")
with open(generated, "wb") as f:
for line in open("src/rundemo-template", "rb"):
if line.strip().decode("ascii") == "#versions":
f.write(('versions = %r\n' % (versions,)).encode("ascii"))
else:
f.write(line)
self.scripts = [generated]
rc = build_scripts.run(self)
os.unlink(generated)
os.rmdir(tempdir)
return rc
commands["build_scripts"] = my_build_scripts
#!/usr/bin/env python
import sys
import versioneer
from setuptools import setup
if sys.version_info[:2] < (2, 7):
sys.exit("conda-build is only meant for Python >=2.7"
"Current Python version: %d.%d" % sys.version_info[:2])
# Don't proceed with 'unknown' in version
version_dict = versioneer.get_versions()
if version_dict['error']:
raise RuntimeError(version_dict["error"])
deps = ['conda', 'requests', 'filelock', 'pyyaml', 'jinja2', 'pkginfo',
'beautifulsoup4', 'chardet', 'pytz', 'tqdm', 'psutil', 'six',
'libarchive-c', 'setuptools']
# We cannot build lief for Python 2.7 on Windows (unless we use mingw-w64 for it, which
# would be a non-trivial amount of work).
# .. lief is missing the egg-info directory so we cannot do this .. besides it is not on
# pypi.
# if sys.platform != 'win-32' or sys.version_info >= (3, 0):
# deps.extend(['lief'])
if sys.version_info < (3, 4):
deps.extend(['contextlib2', 'enum34', 'futures', 'scandir', 'glob2'])
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: "
"GNU General Public License v3 or later (GPLv3+)",
"Environment :: Console",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Database :: Front-Ends",
"Topic :: Software Development :: Libraries :: Python Modules"
)
DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/'
'archive/%s.tar.gz')
_versions = versioneer.get_versions()
VERSION = _versions['version']
VERSION_REVISION = _versions['full-revisionid']
DOWNLOAD_URL = ""
# get the short version for the download url
_version_short = re.findall('\d+\.\d+\.\d+', VERSION)
if len(_version_short) > 0:
VERSION_SHORT = _version_short[0]
DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.
To be used after merging the development branch onto the debian one.
extra_compile_args=ea,
define_macros=[('GPUARRAY_SHARED', None)]
),
Extension('pygpu.collectives',
sources=['pygpu/collectives.pyx'],
include_dirs=include_dirs,
libraries=['gpuarray'],
library_dirs=library_dirs,
extra_compile_args=ea,
define_macros=[('GPUARRAY_SHARED', None)]
)]
cmds = versioneer.get_cmdclass()
cmds["clean"] = cmd_clean
version_data = versioneer.get_versions()
if version_data['error'] is not None:
raise ValueError("Can't determine version for build: %s\n Please make sure that your git checkout includes tags." % (version_data['error'],))
setup(name='pygpu',
version=version_data['version'],
cmdclass=cmds,
description='numpy-like wrapper on libgpuarray for GPU computations',
packages=['pygpu', 'pygpu/tests'],
include_package_data=True,
package_data={'pygpu': ['gpuarray.h', 'gpuarray_api.h',
'blas_api.h', 'numpy_compat.h',
'collectives.h', 'collectives_api.h']},
ext_modules=cythonize(exts),
install_requires=['mako>=0.7', 'six'],
)
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
("License :: OSI Approved :: GNU General "
"Public License v3 or later (GPLv3+)"),
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Communications",
"Topic :: Security",
"Topic :: Utilities"
]
DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask-dev/'
'archive/%s.tar.gz')
_versions = versioneer.get_versions()
VERSION = _versions['version']
VERSION_REVISION = _versions['full-revisionid']
DOWNLOAD_URL = ""
# get the short version for the download url
_version_short = re.findall('\d+\.\d+\.\d+', VERSION)
if len(_version_short) > 0:
VERSION_SHORT = _version_short[0]
DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.
To be used after merging the development branch onto the debian one.
ddir = "d:\pcraster-4.0.1_x86-64"
data_files.extend(mkdatatuples(glob.glob(ddir + "/*.dll"), destdir="."))
# GDAL data files
gdaldata = os.getenv("GDAL_DATA")
if gdaldata == None:
gdaldata = "c:\Anaconda\Library\share\gdal"
data_files.extend(mkdatatuples(glob.glob(gdaldata + "/*.*"), destdir="gdal-data"))
nrbits = str(ctypes.sizeof(ctypes.c_voidp) * 8)
# includes = ['wflow.wflow_bmi','wflow.wflow_w3ra','wflow.wflow_bmi_combined','bmi','bmi.wrapper',"pcraster","osgeo.ogr"]
versions = versioneer.get_versions()
MVERSION = versions["version"]
thename = (
"wflow-bin/Wflow" + MVERSION + "-" + target + "-" + sys.platform + "-" + nrbits
)
packages = ["osgeo"]
if target == "openda":
import thrift.protocol.TBinaryProtocol as TBinaryProtocol
import thrift.transport.THttpClient as THttpClient
import thrift.protocol.TBinaryProtocol as TBinaryProtocol
import thrift.transport.THttpClient as THttpClient
includes = [
"wflow.wflow_bmi",
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Communications :: Email',
'Topic :: Internet',
'Topic :: Security :: Cryptography',
'Topic :: Software Development :: Libraries',
]
DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/'
'archive/%s.tar.gz')
_versions = versioneer.get_versions()
VERSION = _versions['version']
VERSION_REVISION = _versions['full-revisionid']
DOWNLOAD_URL = ""
# get the short version for the download url
_version_short = re.findall('\d+\.\d+\.\d+', VERSION)
if len(_version_short) > 0:
VERSION_SHORT = _version_short[0]
DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.
To be used after merging the development branch onto the debian one.
"""
def run(self):
# versioneer:
versions = versioneer.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"]
_cmd_develop.run(self)
def run(self):
# versioneer:
versions = versioneer.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"]
_develop.run(self)
copy_reqs(self.egg_path)