Skip to content

support install_target in PythonPackage + deprecate use_easy_install & use_setup_py_develop#1341

Merged
boegel merged 4 commits intoeasybuilders:developfrom
SethosII:pythonpackage_install_target
Jan 12, 2018
Merged

support install_target in PythonPackage + deprecate use_easy_install & use_setup_py_develop#1341
boegel merged 4 commits intoeasybuilders:developfrom
SethosII:pythonpackage_install_target

Conversation

@SethosII
Copy link
Copy Markdown
Contributor

This makes the option passed to setup.py configurable. Therefore use_setup_py_develop and use_easy_install are obsolete. install_target = 'develop' and install_target = 'easy_install' can be used instead.

See also easybuilders/easybuild-easyconfigs#5610 (comment).

@boegel
Copy link
Copy Markdown
Member

boegel commented Jan 11, 2018

@SethosII Can you add a clear deprecation log message when use_setup_py_develop or use_easy_install are used?

Something like:

self.log.deprecated("Use 'install_target' rather than 'use_setup_py_develop'.", '4.0')

The 4.0 here indicates that this will result in an error with EasyBuild 4.0 (until then, it will result in a deprecation message).

Ideally, we should also update easyconfigs in the central repo that use either use_setup_py_develop or use_easy_install to use install_target instead, i.e. these:

  • tvb-data
  • tvb-framework
  • tvb-library
  • hanythingondemand
  • vsc-base-2.4.2.eb, vsc-base-2.5.1.eb, vsc-base-2.5.8.eb
  • vsc-mympirun-3.4.2-vsc-base-2.4.2.eb

@boegel boegel added this to the 3.5.1 milestone Jan 11, 2018
@boegel boegel modified the milestones: 3.5.1, 3.6.0 Jan 11, 2018
@SethosII
Copy link
Copy Markdown
Contributor Author

@boegel I added a deprecation message and also another commit to add the functionality from use_easy_install when using install_target = 'easy_install' (add --no-deps to install_opts (https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/generic/pythonpackage.py#L222) and allow zipped_egg (https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/generic/pythonpackage.py#L225 and https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/generic/pythonpackage.py#L248). I created a pull request to use install_target in existing EasyConfigs: easybuilders/easybuild-easyconfigs#5625.

@@ -186,6 +186,7 @@ def extra_options(extra_vars=None):
'use_setup_py_develop': [False, "Install using '%s'" % SETUP_PY_DEVELOP_CMD, CUSTOM],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add (deprecated) to the help message, same for use_easy_install

else:
self.install_cmd = SETUP_PY_INSTALL_CMD

if self.cfg['install_target'] == 'easy_install':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

introduce a EASY_INSTALL_TARGET constant on top, and use that (also use it to define EASY_INSTALL_INSTALL_CMD)

self.cfg.update('installopts', '--no-deps')
if self.cfg.get('zipped_egg', False):
raise EasyBuildError("Installing zipped eggs requires using easy_install or pip")
if self.cfg['install_target'] == 'easy_install':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use EASY_INSTALL_TARGET here too

@boegel boegel modified the milestones: 3.6.0, 3.5.1 Jan 12, 2018
Add deprecated to options help message
Add EASY_INSTALL_TARGET constant
@SethosII
Copy link
Copy Markdown
Contributor Author

@boegel I added the requested changes.

@boegel boegel changed the title Add install_target to pythonpackage support install_target in PythonPackage + deprecate use_easy_install & use_setup_py_develop Jan 12, 2018
@boegel
Copy link
Copy Markdown
Member

boegel commented Jan 12, 2018

Thanks a lot for your effort @SethosII!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants