Thanks to visit codestin.com
Credit goes to github.com

Skip to content

consider this COMPILED_FOR_PYTHON_VERSION_INDEX #87

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

Closed
Alexey-T opened this issue Oct 11, 2019 · 2 comments
Closed

consider this COMPILED_FOR_PYTHON_VERSION_INDEX #87

Alexey-T opened this issue Oct 11, 2019 · 2 comments

Comments

@Alexey-T
Copy link

I use const which is autodetected, and no need to make N lines with N values.

{$ifdef darwin}
  PYTHON_KNOWN_VERSIONS: array[1..10] of TPythonVersionProp =
    (
    (DllName: 'libpython2.6.dylib'; RegVersion: '2.6'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython2.7.dylib'; RegVersion: '2.7'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.0.dylib'; RegVersion: '3.0'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.1.dylib'; RegVersion: '3.1'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.2.dylib'; RegVersion: '3.2'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.3.dylib'; RegVersion: '3.3'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.4.dylib'; RegVersion: '3.4'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.5.dylib'; RegVersion: '3.5'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.6.dylib'; RegVersion: '3.6'; APIVersion: 1013; CanUseLatest: True),
    (DllName: 'libpython3.7.dylib'; RegVersion: '3.7'; APIVersion: 1013; CanUseLatest: True)
    );
{$endif}

  COMPILED_FOR_PYTHON_VERSION_INDEX = High(PYTHON_KNOWN_VERSIONS);  
@Alexey-T Alexey-T changed the title consider this diff consider this COMPILED_FOR_PYTHON_VERSION_INDEX Oct 11, 2019
@pyscripter
Copy link
Owner

Fine. Could you submit a patch?

pyscripter added a commit that referenced this issue Oct 12, 2019
@pyscripter
Copy link
Owner

Never mind. I have added Darwin support. Regarding COMPILED_FOR_PYTHON_VERSION_INDEX the idea was that you could compile for a version smaller than the latest e.g. 2.7. This is of limited usefulness nowadays.

But I am planning to change it when I also remove the misunderstood and confusing UseLastKnownVersion option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants