-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not fail when bcolz import fails #161
Conversation
If you want to make bcolz optional (which is fine with me given its very limited usage), please include an explicit exception if its functionality (interpolate in this case) is used anyway. 2 other places need to be adapted too:
|
Just starting the conversation to test your mood ;-) |
Could you write the sentence you would like to appear in https://github.com/liam2/liam2/blob/master/INSTALL ? |
just move it to the optional dependencies paragraph with something like:
|
try: | ||
import bcolz | ||
except ImportError: | ||
bcolz = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz move this below the "optional deps" comment
@@ -210,7 +213,7 @@ def __call__(self, parser, namespace, values, option_string=None): | |||
matplotlib {mpl} | |||
""".format(py=py_version, np=numpy.__version__, ne=numexpr.__version__, | |||
pt=tables.__version__, vt=vt_version, mpl=mpl_version, | |||
bc=bcolz.__version__, yml=yaml.__version__)) | |||
bc=bcolz.__version__ if bcolz is not None else None, yml=yaml.__version__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz use N/A when missing, and use the same template (bc_version = ...) than for other optional deps (it is not especially better, but lets be consistent)
@@ -143,5 +143,12 @@ def vitables_data_files(): | |||
ext_modules=ext_modules, | |||
options={"build_ext": build_ext_options, "build_exe": build_exe_options}, | |||
executables=[Executable("main.py")], | |||
requires=['numpy', 'numexpr', 'tables', 'bcolz']) | |||
install_requires=['numpy', 'numexpr', 'tables'], | |||
extra_requires=dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I never bothered to look up the exact syntax :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested though !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test then ;-)
On Wed, May 13, 2015 at 10:51 AM, Mahdi Ben Jelloul <
notifications@github.com> wrote:
In src/setup.py
#161 (comment):@@ -143,5 +143,12 @@ def vitables_data_files():
ext_modules=ext_modules,
options={"build_ext": build_ext_options, "build_exe": build_exe_options},
executables=[Executable("main.py")],
requires=['numpy', 'numexpr', 'tables', 'bcolz'])
install_requires=['numpy', 'numexpr', 'tables'],
extra_requires=dict(
Not tested though !
Reply to this email directly or view it on GitHub
https://github.com/liam2/liam2/pull/161/files#r30212604.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually use another setup.py hacked to work on a linux machine so won't be able to test it for windows users (@AlexisEidelman ?). I do not plan to submit a complete overhaul of setup.py (with a travis CI config file etc) this early. My pint with this commit was to propagate upstream as soon as possible what could be propagated without to much hassle.
But i did checked the syntax though ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm a quick google seem to suggest "extras_require" instead of "extra_requires"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I will fix that
Looks good to me, thanks! |
Do not fail when bcolz import fails
No description provided.