tfrederiksen / inelastica

Python package for eigenchannels, vibrations and inelastic electron transport based on SIESTA/TranSIESTA DFT
https://tfrederiksen.github.io/inelastica
GNU Lesser General Public License v3.0
34 stars 16 forks source link

Python 3 support #4

Closed zerothi closed 3 years ago

zerothi commented 6 years ago

These things should be added

tfrederiksen commented 6 years ago

The point about scripts and entry_points remains open.

zerothi commented 6 years ago

I have added a commit that re-enables the travis tests for Py3, so now py2 and py3 are both tested.

jonaslb commented 5 years ago

At the current time, perhaps it would be more wise to simply 'move' to Python 3 entirely (and setuptools rather than distutils, which I believe is necessary for entry_points). Python 2.7 is completely end-of-(extended-)life in a year anyway.

Personally, I'd love to be able to use f-strings (introduced in Python 3.6), so that is one possible minimum version to set. It is also the version that the latest Ubuntu LTS (18.04) shipped with. The one before that (16.04) has py3.4, so that is another possible minimum version to set.

tfrederiksen commented 5 years ago

Thanks for your inputs, @jonaslb. Indeed f-strings look nice. Eventually I guess we should move to Py3, but I am a little lazy in that respect and hesitant to exclude Py2 before it is strictly necessary.

zerothi commented 5 years ago

I agree that we should eventually move to Py3. However, Inelastica has been a Py2-only for quite some time. And only recently began the Py3 transition. So I think it would be wise to keep it Py2 compliant for some time still.

I think that Inelastica could start fully migrating once all major tools have moved to Py3, see https://python3statement.org/

For sisl I will only support 3.6 from mid 2019, see zerothi/sisl#101.

zerothi commented 5 years ago

I have just corrected my point on entry_points. Sadly, they don't allow the same PYTHONPATH installation directory for both py2 and py3.

They do however solve the problem of fixing the she-bang line to the python executable used for installing the package. So anyways it would be highly recommendable.