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

Use native meson python module for python install. #253

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

jameshilliard
Copy link
Contributor

This seems to be more reliable than shelling out to pip.

Comment on lines 9 to 11
if pythonver.version_compare('<3.7')
error('Python @0@ is not supported anymore, please port your code to python3.7 or newer.'.format(python.language_version()))
endif
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to relax this a bit. Some Jetson boards still ship will lower Python versions. For example:
Jetson Xavier AGX - Jetpack 4.6

nvidia@localhost:~$ python3 --version
Python 3.6.9

Is Python officially dropping maintenance for pre 3.7?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, that may have been due to a feature(asynccontextmanager) requiring 3.7 that I used in #252, I can probably rework that for python 3.6 compatibility if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebased and reverted minimum python version to 3.5, I'll re-base the asyncio pull request on top of this one after. Is python3.6 the minimum version we need to support?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would drop it to plain 3, and add a special requirement for the asyncio client independently (in that branch). We can't drop the original client for backwards compatibility reasons, so I'm thinking a more model alternative of the client.

Copy link
Contributor Author

@jameshilliard jameshilliard Sep 24, 2021

Choose a reason for hiding this comment

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

I would drop it to plain 3

Well it's currently minimum 3.5 here, is that requirement accurate?:

python_requires='>=3.5',

We can't drop the original client for backwards compatibility reasons, so I'm thinking a more model alternative of the client.

Oh, I guess there's clients that expect a stable API across library versions? I can probably just add some compatibility shims for API compatibility.

@jameshilliard jameshilliard force-pushed the python-install branch 2 times, most recently from 8e9e983 to 231e48a Compare September 24, 2021 16:13
pymod = import('python')
python = pymod.find_installation(
get_option('with-python-version'),
required : get_option('enable-python').enabled(),

Choose a reason for hiding this comment

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

This accepts a feature option directly, no need to convert it into a boolean.

And properly using feature options means that when passing -Denable-python=disabled, this python installation will be skipped rather than "looked for, but not required".

... Also the "enable-" in this option name seems a bit redundant given it needs to be defined as one of:

  • -Denable-python=disabled
  • -Denable-python=enabled
  • -Denable-python=auto

and the first two are... pretty confusing.

Choose a reason for hiding this comment

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

Oh hmm, okay, I see the existing feature options use that "enable-" stuff already... never mind I guess.

:(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This accepts a feature option directly, no need to convert it into a boolean.

Fixed.

Oh hmm, okay, I see the existing feature options use that "enable-" stuff already... never mind I guess.

Yeah, I had used that style for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, it is redundant. I assume this came from the autotools port. I may change them in a future branch.

@michaelgruner michaelgruner merged commit babeb30 into RidgeRun:develop Jun 16, 2022
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

Successfully merging this pull request may close these issues.

3 participants