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

On windows it always depends on vc9 runtime #541

Closed
thierryba opened this Issue Apr 6, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@thierryba
Copy link

thierryba commented Apr 6, 2017

I'm building python with vc2015 as well as psycopg but the setup.py script make it use a vc9 manifest unconditionally.
That makes it that even if it doesn't really need that runtime, the psycopg module cannot be loaded if you don't have the vc2008 redistributables.

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Apr 6, 2017

If you propose a fix we can use we can integrate it. If you are building python your own custom way you should customise psycopg too I guess.

@dvarrazzo dvarrazzo added the windows label Apr 6, 2017

@thierryba

This comment has been minimized.

Copy link

thierryba commented Apr 7, 2017

I'm just building python 3.5+. That builds by default with vc 2015. My own fix is to mot use the manifest but I'm not sure that is a good idea... or is it?

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Apr 7, 2017

Maybe @jerickso knows...

@jerickso

This comment has been minimized.

Copy link
Member

jerickso commented Apr 7, 2017

From what I vaguely remember, the purpose of the manifest is for when python is used in an embedded type situation (such as apache/mod_wsgi), where python.exe is not the main executable. In these situations, the master program might be using different versions of the MSVC runtime libraries.

If you are not using psycopg in an embedded environment, the manifest is not required.

The true fix for the distribution is to have the proper manifests for each version. I'll put that on my task list to fix.

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Apr 7, 2017

I guess we should try and match what we build with:

    # Py 2.7 = VS Ver. 9.0  (VS 2008)
    # Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010)
    # Py 3.5, 3.6 = VS Ver. 14.0 (VS 2015)

@thierryba can you please provide a patch? Thank you

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Jun 8, 2017

Any news about this issue?

@jerickso

This comment has been minimized.

Copy link
Member

jerickso commented Jun 8, 2017

jerickso added a commit to jerickso/psycopg that referenced this issue Jun 9, 2017

Remove VC9 runtime dependency
Changed check in setup.py to only use vc9 manifest when built against
versions that use the MSVC 2008 compiler.  Resolves psycopg#541.

Note that as of VS 2010, a manifest is no longer needed according to this
comment, "...we are no longer deploying the VC dlls as Win32 assemblies.
They are regular dlls that can be loaded without a manifest."

https://connect.microsoft.com/VisualStudio/feedback/details/522121/crtassem-h-missing
@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Jun 9, 2017

Hello @thierryba, could you please verify if the fix proposed in #566 solves your problem? Thank you very much.

@dvarrazzo dvarrazzo added this to the psycopg 2.7.2 milestone Jun 9, 2017

dvarrazzo added a commit that referenced this issue Jun 16, 2017

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Jun 16, 2017

No news from the op. Assuming the issue fixed.

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