Re: make check without Python 2

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

 



On Tue, Feb 20, 2018 at 5:57 AM, Ricardo Dias <rdias@xxxxxxxx> wrote:
>
>
> On 20-02-2018 10:39, Nathan Cutler wrote:
>>>
>>> If we are replacing "python" for "python3" in bash scripts, and say that
>>> python2 is optional, how do we run "make check" in a python2 environment?
>>
>>
>> Let's distinguish between a python2 environment and a python2-only
>> environment.
>>
>> With this proposed change, it would no longer be possible to run make
>> check in a *python2-only* environment.
>>
>> A more complicated solution would be to write python2 and python3 versions
>> of all scripts with shebangs, and do cmake magic to run one, the other, or
>> both. That would require us to maintain two nearly identical versions of
>> each script.
>>
>> Another way would be to stop relying on the shebangs to execute the
>> scripts, since they are not flexible.

This sounds surprising, I've known this as being very flexible and
standard practice, because it will allow to adhere to whatever Python
the environment provides.

I don't know where the various make check scripts that use this
convention are, or how they are hooked up, but if we are willing to
move to improve this a bit, might be a good time to consider
writing better tests with an actual test runner like we do in most of
the Ceph Python tools.

In ceph-volume, ceph-deploy, ceph-medic, and ceph-installer it doesn't
matter if the environment is Python 3 or Python 2, the tests will run.
There is no "script", as there are actual, standard, Python tests.

Changing make check in that way would not prevent someone to run on a
python-2-only environment, would work on a python-3-only environment,
or a mixed python one.
>
>
> This last alternative seems better. What would be needed to implement this
> last alternative, besides removing all the shebang lines from the scripts?
>
>>
>> Nathan
>> --
>> 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
>>
>
> --
> Ricardo Dias
> Senior Software Engineer - Storage Team
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
> HRB 21284
> (AG Nürnberg)
> --
> 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