diff --git a/bindings/python/setup_pypi.py b/bindings/python/setup_pypi.py deleted file mode 100644 index 2c6daf3a6a8..00000000000 --- a/bindings/python/setup_pypi.py +++ /dev/null @@ -1,67 +0,0 @@ -from setuptools import setup -from distutils.core import Extension -from distutils import sysconfig -from os import getenv, walk, path, path, getcwd, chdir -from platform import system - -# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++. -cfg_vars = sysconfig.get_config_vars() -opt = cfg_vars["OPT"] -cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag != '-Wstrict-prototypes' ) - - -sources = list() -depends = list() - -for dirname, dirnames, filenames in walk('src'): - for filename in filenames: - if filename.endswith('.cc'): - sources.append(path.join(dirname, filename)) - elif filename.endswith('.hh'): - depends.append(path.join(dirname, filename)) - -# Get package version -with open ('VERSION_INFO') as verfile: - version = verfile.read().strip() - -def getincdir_osx(): - # Assume xrootd was installed via homebrew - return '/usr/local/Cellar/xrootd/{0}/include/xrootd'.format(version) - -def getlibdir(): - return (system() == 'Darwin' and '/usr/local/lib') or '/usr/lib' - -def getincdir(): - return (system() == 'Darwin' and getincdir_osx()) or '/usr/include/xrootd' - -xrdlibdir = getenv( 'XRD_LIBDIR' ) or getlibdir() -xrdincdir = getenv( 'XRD_INCDIR' ) or getincdir() - -print 'XRootD library dir: ', xrdlibdir -print 'XRootD include dir: ', xrdincdir -print 'Version: ', version - -setup( name = 'xrootd', - version = version, - author = 'XRootD Developers', - author_email = 'xrootd-dev@slac.stanford.edu', - url = 'http://xrootd.org', - license = 'LGPLv3+', - description = "XRootD Python bindings", - long_description = "XRootD Python bindings", - packages = ['pyxrootd', 'XRootD', 'XRootD.client'], - package_dir = {'pyxrootd' : 'src', - 'XRootD' : 'libs', - 'XRootD.client': 'libs/client'}, - ext_modules = [ - Extension( - 'pyxrootd.client', - sources = sources, - depends = depends, - libraries = ['XrdCl', 'XrdUtils', 'dl'], - extra_compile_args = ['-g'], - include_dirs = [xrdincdir], - library_dirs = [xrdlibdir] - ) - ] - ) diff --git a/bindings/python/setup_standalone.py b/bindings/python/setup_standalone.py deleted file mode 100644 index 7d07b5678b7..00000000000 --- a/bindings/python/setup_standalone.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import print_function -from setuptools import setup -from distutils.core import Extension -from distutils import sysconfig -from os import getenv, walk, path, path, getcwd, chdir -import sys -import subprocess - -# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++. -cfg_vars = sysconfig.get_config_vars() -opt = cfg_vars["OPT"] -cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ] ) - -cflags = cfg_vars["CFLAGS"] -cfg_vars["CFLAGS"] = " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ] ) - -py_cflags = cfg_vars["PY_CFLAGS"] -cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ] ) - - -sources = list() -depends = list() - -for dirname, dirnames, filenames in walk('src'): - for filename in filenames: - if filename.endswith('.cc'): - sources.append(path.join(dirname, filename)) - elif filename.endswith('.hh'): - depends.append(path.join(dirname, filename)) - - -version = subprocess.check_output(["xrootd-config", "--version"]).decode(sys.getdefaultencoding()).strip() -prefix = subprocess.check_output(["xrootd-config", "--prefix"]).decode(sys.getdefaultencoding()).strip() -print(version) -print(prefix) -xrdlibdir = path.join(prefix, "lib") -if not path.exists(xrdlibdir): - xrdlibdir = path.join(prefix, "lib64") -xrdincdir = path.join(prefix, "include", "xrootd") - -print('XRootD library dir: ', xrdlibdir) -print('XRootD include dir: ', xrdincdir) -print('Version: ', version) - -setup( name = 'xrootd', - version = version, - author = 'XRootD Developers', - author_email = 'xrootd-dev@slac.stanford.edu', - url = 'http://xrootd.org', - license = 'LGPLv3+', - description = "XRootD Python bindings", - long_description = "XRootD Python bindings", - packages = ['pyxrootd', 'XRootD', 'XRootD.client'], - package_dir = {'pyxrootd' : 'src', - 'XRootD' : 'libs', - 'XRootD.client': 'libs/client'}, - ext_modules = [ - Extension( - 'pyxrootd.client', - sources = sources, - depends = depends, - libraries = ['XrdCl', 'XrdUtils', 'dl'], - extra_compile_args = ['-g'], - include_dirs = [xrdincdir], - library_dirs = [xrdlibdir] - ) - ] - ) diff --git a/dopy.sh b/dopy.sh deleted file mode 100755 index 2f870ad8dc2..00000000000 --- a/dopy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Writes the xrootd version to bindings/python/VERSION_INFO, -# generates and uploads a source distribution for the python bindings. -./genversion.sh --print-only | sed "s/v//" > bindings/python/VERSION_INFO -cd bindings/python -cp setup_pypi.py setup.py -python setup.py sdist -twine upload dist/* -rm setup.py dist/* -