Re: make check without Python 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 22, 2018 at 12:15 PM, Willem Jan Withagen <wjw@xxxxxxxxxxx> wrote:
> On 21-2-2018 01:09, Ken Dreyer wrote:
>>
>> On Tue, Feb 20, 2018 at 3:20 AM, Nathan Cutler <ncutler@xxxxxxx> wrote:
>>>
>>> Work is now ongoing to gradually wean Ceph off Python 2.
>>>
>>> Currently, Python 2 is a hard requirement - Ceph will not work smoothly
>>> without it. The goal is to change this so that Python 3 is required and
>>> Python 2 is optional.
>>>
>>> We have Ceph building in environments without Python 2, but it does not
>>> yet
>>> pass "make check". One of the reasons (and possibly the only reason) for
>>> the
>>> "make check" failure is that several test scripts have a shebang
>>> "#!/usr/bin/env python" which of course fails in a Python 3-only
>>> environment.
>>>
>>> (Yes, there *might* be a symlink from python -> python3, but this is not
>>> assured and SUSE, at least, is not going in this direction.)
>>
>>
>> Generalizing, how is SUSE handling all upstream projects that have
>> "#!/usr/bin/env python"? Are you patching all of those to
>> #!/usr/bin/python3 ?
>
>
> Please don't....
>
> Since python, be it 2 or 3 doesn't live in /usr/bin/ on all systems...
> And the shebang is the perfect tool to fix that, so please don't start
> reverting this too, if ever ceph wants to stay a bit portable...

Yeah, I agree here with not changing this. Like I'd mentioned, we
could just start treating these Python tests like tests
that can be run with a test runner (and possibly linked into make check)

Then this wouldn't be a problem. I volunteer to help out here where
needed, I just don't consume or use make check so that part
would need someone else to drive

>
> In a more extreem extend I would even suggest as much as writing a python
> selector of a kind so the shebang would be like:
>
> #/usr/bin/env python-version-select
> And then set an ENV like: PYTHON_VER_REQ=3 or something of the kind.
> Or any other preferred why of selecting the choice of day.
>
> --WjW
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux