Skip to content
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

Setup fails to run on pybuilder 0.12.2 or later #706

Closed
rolandsing opened this issue Apr 23, 2020 · 5 comments · Fixed by #707
Closed

Setup fails to run on pybuilder 0.12.2 or later #706

rolandsing opened this issue Apr 23, 2020 · 5 comments · Fixed by #707
Labels
external-plugins External plugin issue

Comments

@rolandsing
Copy link

rolandsing commented Apr 23, 2020

Our company has a pybuilder package for an internal utility library that we use for our python development. Since pybuilder 0.12.2 was released, this library fails to install using pip. The following errors occur:

(venv) $ pip install git+ssh://git@github.com/skywatch-engineering/endpoint-util.git
Collecting git+ssh://git@github.com/skywatch-engineering/endpoint-util.git
  Cloning ssh://git@github.com/skywatch-engineering/endpoint-util.git to /private/var/folders/7_/pvz_xscd2p72nknxpw8wvw400000gn/T/pip-hdwola22-build
    Complete output from command python setup.py egg_info:
    pyb 0.12.2
    PyBuilder version 0.12.2
    Build started at 2020-04-23 16:51:39
    ------------------------------------------------------------
    [INFO]  Installing or updating plugin "pypi:pybuilder_pytest, module name 'pybuilder_pytest'"
    [INFO]  Processing plugin packages 'pybuilder_pytest' to be installed with {}
    ------------------------------------------------------------
    BUILD FAILED - Missing plugin plugin 'pypi:pybuilder_pytest', module 'pybuilder_pytest': Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pybuilder/pluginloader.py", line 175, in _load_plugin
        __import__(plugin_module_name)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pybuilder/reactor.py", line 532, in __import_with_plugins
        return self._old_import(*args, **kwargs)
      File "/private/var/folders/7_/pvz_xscd2p72nknxpw8wvw400000gn/T/pip-hdwola22-build/.pybuilder/plugins/cpython-3.6.1.final.0/lib/python3.6/site-packages/pybuilder_pytest/__init__.py", line 22, in <module>
        from pybuilder.plugins.python.unittest_plugin \
    ImportError: cannot import name '_register_test_and_source_path_and_return_test_dir'
     (site-packages/pybuilder/pluginloader.py:181)
    ------------------------------------------------------------
    Build finished at 2020-04-23 16:51:47
    Build took 8 seconds (8416 ms)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7_/pvz_xscd2p72nknxpw8wvw400000gn/T/pip-hdwola22-build/

This install was run in a virtual environment. If I use pybuilder 0.12.1, the pip install completes without error.

Is there something that I need to change in build.py or somewhere else in the packaging code for this library so it will work with the latest version of pybuilder?

Thanks in advance for your help.

@arcivanov
Copy link
Member

This is a duplicate of #704 : _register_test_and_source_path_and_return_test_dir is an internal API that was (incorrectly) used by one of the plugins you are using: pybuilder_pytest:

File "/private/var/folders/7_/pvz_xscd2p72nknxpw8wvw400000gn/T/pip-hdwola22-build/.pybuilder/plugins/cpython-3.6.1.final.0/lib/python3.6/site-packages/pybuilder_pytest/__init__.py", line 22, in <module>

Since @AlexeySanko no longer maintains this plugin I'll have to return this function back just to make sure it's not breaking stuff for so many people.

@arcivanov arcivanov added the external-plugins External plugin issue label Apr 24, 2020
@arcivanov
Copy link
Member

Umm... no I can't do this - plugin loads code into PyBuilder core. I'll readd this function TEMPORARILY to make sure you guys can use this, but it'll be obsoleted in future versions once PyTest plugin is supported.

@arcivanov
Copy link
Member

fixed in 0.12.4

@rolandsing
Copy link
Author

Thank you @arcivanov. How long will this fix be active? I need to know how long I have to refactor our library to no longer use pybuilder_pytest.

@arcivanov
Copy link
Member

Fix will be active until I build a replacement for pybuilder_pytest in the core. The removed method will not be used by any PyB code and as such will not have any side effects until PyTest plugin replacement is built.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-plugins External plugin issue
Projects
None yet
2 participants