PBR

wsgi entry points not supported on windows

Bug #1521407 reported by Robert Collins
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Wishlist
Joe D'Andrea

Bug Description

In LocalInstallScripts we have this code:

       if os.name != 'nt':
            get_script_args = override_get_script_args
        else:
            get_script_args = easy_install.get_script_args
            executable = '"%s"' % executable

And the suppot for extra templates is done in override_get_script_args, so if we don't call into that, we won't generate scripts for anything other than the pure default setuptools would have done.

Note that this is also encoded into tests which skip this on windows :/.

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

+1. We noticed that a wsgi script was not generated on Windows.

Is there a workaround, short of carrying over a generated script from another platform?

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

We've since noticed that, rather than using sdist, if we use bdist_wheel the wsgi scripts are generated and everything works just fine. So bdist_wheel is a workaround, but using a whl package shouldn't be required here.

Since override_get_script_args isn't being used in the nt case, the wsgi stuff is overlooked.

Suspecting this is just an unintended oversight on Windows.

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

To sum up, then, the wsgi stuffs *are* handled when making a wheel. This should be doable with a sdist as well.

Also keep in mind, this 'nt' check was set up that way on purpose. It reportedly reduces nt process startup time by orders of magnitude. Probably don't want to roll that back. https://github.com/openstack-dev/pbr/commit/8e58c2fa58fd1aa6f9985dcb4e210508a73e1df7

Joe D'Andrea (jdandrea)
Changed in pbr:
assignee: nobody → Joe D'Andrea (joedandrea)
Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Per discussion between jdandrea and clarkb on #openstack-oslo:

http://eavesdrop.openstack.org/irclogs/%23openstack-oslo/%23openstack-oslo.2017-09-06.log.html

It now appears ok to remove the Windows conditions that skip executing override_get_script_args() and install_wrapper_scripts(). Having demonstrated that bdist_wheel works, it should now work for sdist too, and experiments do indeed appear to bear that out.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to pbr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/502524

Changed in pbr:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to pbr (master)

Reviewed: https://review.openstack.org/502524
Committed: https://git.openstack.org/cgit/openstack-dev/pbr/commit/?id=07de844615eaec520d817558462cda5f91f9b7b8
Submitter: Jenkins
Branch: master

commit 07de844615eaec520d817558462cda5f91f9b7b8
Author: Joe D'Andrea <email address hidden>
Date: Mon Sep 11 14:01:22 2017 -0400

    Remove win32/nt checks for wrapper script gen

    It now appears safe to remove the Windows conditions that skip
    executing override_get_script_args() and install_wrapper_scripts().
    Having demonstrated that bdist_wheel works, it should now work for
    sdist too, and experiments do indeed appear to bear that out.

    Change-Id: Ic243a3ccd3aee0dcb17d6419bc44271f5ebe5551
    Closes-Bug: 1521407

Changed in pbr:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack-dev/pbr 4.0.0

This issue was fixed in the openstack-dev/pbr 4.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.