Skip to content

Commit

Permalink
setup.py :: make gnureadline optional and define GNUREADLINE for gnur…
Browse files Browse the repository at this point in the history
…eadline dependency
  • Loading branch information
adriansev committed Mar 12, 2024
1 parent c8fde90 commit 0fc5ac5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions alienpy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import sys

ALIENPY_VERSION_HASH = '7b25aa3'
ALIENPY_VERSION_DATE = '20240219_154918'
ALIENPY_VERSION_HASH = 'acc049e'
ALIENPY_VERSION_DATE = '20240312_205248'
ALIENPY_VERSION_STR = '1.5.9'

if __name__ == '__main__':
Expand Down
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import setuptools
import traceback


try:
from alienpy.version import ALIENPY_VERSION_HASH, ALIENPY_VERSION_DATE, ALIENPY_VERSION_STR
except Exception:
Expand All @@ -18,21 +17,23 @@
long_description = fh.read()

base_requirements = [ 'async-stagger', 'pyOpenSSL', 'rich', 'requests', ]
alibuild_requirements = [ 'gnureadline' ]
local_requirements = [ 'xrootd' ]

if sys.version_info[1] < 7:
base_requirements.append('websockets<=9.1')
else:
base_requirements.append('websockets')

# ALICE needs gnureadline as the python built does not have built-in readline for macos reasons
# also the xrootd is built in a separate recipe
if "ALIBUILD" in os.environ:
selected_requirements = base_requirements + alibuild_requirements
else:
# ALICE have XRootD built in a separate recipe
selected_requirements = base_requirements

if not "ALIBUILD" in os.environ:
selected_requirements = base_requirements + local_requirements

defined_extras = {}
if sys.platform.lower() == 'darwin':
defined_extras['GNUREADLINE'] = ['gnureadline']

setuptools.setup(
name = "alienpy",
version = ALIENPY_VERSION_STR,
Expand All @@ -44,6 +45,7 @@
long_description_content_type = "text/markdown",
url = "https://gitlab.cern.ch/jalien/xjalienfs",
install_requires = selected_requirements,
extras_require = defined_extras,
python_requires = '>=3.6',
classifiers = [
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 0fc5ac5

Please sign in to comment.