Giter Site home page Giter Site logo

Comments (11)

maplesond avatar maplesond commented on August 12, 2024

The docs do say that python3 is required, both in the README and the manual. Technically yes python 3.1 is the minimum required version, although I'd be surprised if anyone is still running 3.0 on their system as this about 8 years old. Just out of interest were you running 3.0? If so I'll leave this case open until I've made this clear in the docs.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

My default python is 2.7 but I do have also 3.4 and 3.5 installed. Here is what my Gentoo Linux says:

$ eselect python list
Available Python interpreters, in order of preference:
[1] python2.7
[2] python3.5
[3] python3.4 (fallback)
$

And here is the output of configure:

checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib64/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for python2.7... (cached) /usr/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.1'... no
configure: WARNING: this package requires Python >= '3.1'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.

checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python2.7
checking for Python library path... -L/usr/lib64 -lpython2.7
checking for Python site-packages path... /usr/lib64/python2.7/site-packages

from kat.

maplesond avatar maplesond commented on August 12, 2024

There is a bug with the pythonversion variable in this release. this means kat expects python3 to be the default on your system. Ive fixed it in the develop branch and this will allow you to keep python2 as default and request a specific version for use with KAT.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

Thank you, is this in the HEAD included?

emerge =sci-biology/kat-9999

Verifying ebuild manifests

Emerging (1 of 1) sci-biology/kat-9999::science
Unpacking source...

checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib64/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for python2.7... (cached) /usr/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.1'... no
configure: WARNING: this package requires Python >= '3.1'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.

checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python2.7
checking for Python library path... -L/usr/lib64 -lpython2.7
checking for Python site-packages path... /usr/lib64/python2.7/site-packages

from kat.

maplesond avatar maplesond commented on August 12, 2024

It wont be at the top of master yet as these changes are still development. Hence they are at the top of devel. Im away on holiday starting tomorrow so I dont have time to verify all the changes before then. Ill try to get a proper release out by the end of next week. Hopefully you can work around the issues in the meantime.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

OK, I thought I can test the committed patch but take your time.

from kat.

maplesond avatar maplesond commented on August 12, 2024

The fix should be in the V2.2.0 release. You can select specific python versions when configuring KAT like this:

./configure PYTHON_VERSION=3.4

I'll close the case, but feel free to reopen if there are any outstanding questions.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

So I hope I fetched now the 2.2.0 tarball properly:

>>> Downloading 'https://github.com/TGAC/KAT/releases/download/Release-2.2.0/kat-2.2.0.tar.gz'
--2016-11-30 22:18:05--  https://github.com/TGAC/KAT/releases/download/Release-2.2.0/kat-2.2.0.tar.gz
Resolving github.com... 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/13294309/263f1ffc-9d12-11e6-803c-ac6cf6742f1d.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161130%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161130T211804Z&X-Amz-Expires=300&X-Amz-Signature=11ba4e236eae19cb29647aef7f7cdf2c8863723be20853bd0c996f725d10f8dc&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dkat-2.2.0.tar.gz&response-content-type=application%2Foctet-stream [following]
--2016-11-30 22:18:05--  https://github-cloud.s3.amazonaws.com/releases/13294309/263f1ffc-9d12-11e6-803c-ac6cf6742f1d.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161130%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161130T211804Z&X-Amz-Expires=300&X-Amz-Signature=11ba4e236eae19cb29647aef7f7cdf2c8863723be20853bd0c996f725d10f8dc&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dkat-2.2.0.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com... 52.216.0.112
Connecting to github-cloud.s3.amazonaws.com|52.216.0.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14253573 (14M) [application/octet-stream]
Saving to: ‘/scratch/usr/portage/distfiles/kat-2.2.0.tar.gz’

When just running ./configure I still get:

checking for python... /usr/bin/python
configure: Found python version: 2.7.12
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.1'... no
configure: WARNING: this package requires Python >= '3.1'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.

configure: Ensuring environment variable 'PYTHON_VERSION' set to: 
checking for the distutils Python package... yes

I think the configure should set the PYTHON_VERSION on its own to 2.7 in my case.

The below is rather my Linux-distro-specific but for your info I have the following python versions installed:


# eselect python list
Available Python interpreters, in order of preference:
  [1]   python2.7
  [2]   python3.5
  [3]   python3.4 (fallback)
#

Of course, respecting user's value in PYTHON_VERSION is a good idea. I just wonder whether you could handle more gracefully the cases when users did not specify the python version in advance.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

I think to support other python implememtations (jython, pypi etc.) you should not antcipate just version number but whole executable filename. Here I show you prepend "python" in front of "$PYTHON_VERSION" variable:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/kat-2.2.0 --htmldir=/usr/share/doc/kat-2.2.0/html --libdir=/usr/lib64 PYTHON_VERSION=python2_7

...

checking for pythonpython2_7... no
configure: WARNING: Cannot find pythonpython2_7 in your system path
./configure: line 17491: -c: command not found
./configure: line 17494: -c: command not found
./configure: line 17500: -c: command not found
configure: Found python version: 
checking for a version of Python >= '2.1.0'... no
configure: error: in `/scratch/var/tmp/portage/sci-biology/kat-2.2.0/work/kat-2.2.0':
configure: error: 
This version of the AC_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.

What you cannot just pick whatever "python" resolves to? You can run "python --version" to see which version it really is.

from kat.

maplesond avatar maplesond commented on August 12, 2024

Ok, so as I understand it you're requesting two things:

  1. If the user does have python3.X installed but this isn't the default implementation then try to automatically detect and use this instead.

  2. Modify use of PYTHON_VERSION so it also allows the user to prefix the version number with "python".

If I've understood correctly I'll reopen the case and take a look at these next time I come around to doing more development work on KAT.

from kat.

mmokrejs avatar mmokrejs commented on August 12, 2024

If the user does have python3.X installed but this isn't the default implementation then try to automatically detect and use this instead.

Yes. Supposedly "python" points to the preferred implementation. Eventually "python2" or "python3". The below is how Gentoo Linux handles the multiple python installations. NOte the python2 and python3 are symlinks, and are managed by "eselect python" utility.

# ls -latr /usr/bin/python*
-rwxr-xr-x 1 root root   14010 Mar 20  2014 /usr/bin/python-exec-c
-rwxr-xr-x 1 root root    1397 Mar 20  2014 /usr/bin/python-exec
-rwxr-xr-x 1 root root 1001688 Apr 13  2015 /usr/bin/python_ncbi_dbapi_test
-rwxr-xr-x 1 root root    7936 Nov 12 02:02 /usr/bin/python2.7
-rwxr-xr-x 1 root root    1463 Nov 12 02:02 /usr/bin/python2.7-config
-rwxr-xr-x 1 root root    2922 Nov 12 02:04 /usr/bin/python3.5m-config
-rwxr-xr-x 1 root root   12440 Nov 12 02:05 /usr/bin/python3.5m
lrwxrwxrwx 1 root root      17 Nov 12 02:05 /usr/bin/python3.5-config -> python3.5m-config
lrwxrwxrwx 1 root root      10 Nov 12 02:05 /usr/bin/python3.5 -> python3.5m
-rwxr-xr-x 1 root root   12432 Nov 12 02:07 /usr/bin/python3.4m
-rwxr-xr-x 1 root root    2890 Nov 12 02:07 /usr/bin/python3.4m-config
lrwxrwxrwx 1 root root      17 Nov 12 02:07 /usr/bin/python3.4-config -> python3.4m-config
lrwxrwxrwx 1 root root      10 Nov 12 02:07 /usr/bin/python3.4 -> python3.4m
-rwxr-xr-x 1 root root   18136 Nov 14 17:20 /usr/bin/python-exec2c
lrwxrwxrwx 1 root root      31 Nov 14 17:20 /usr/bin/python3-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root      13 Nov 14 17:20 /usr/bin/python3 -> python-exec2c
lrwxrwxrwx 1 root root      31 Nov 14 17:20 /usr/bin/python2-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root      13 Nov 14 17:20 /usr/bin/python2 -> python-exec2c
lrwxrwxrwx 1 root root      31 Nov 14 17:20 /usr/bin/python-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root      13 Nov 14 17:20 /usr/bin/python -> python-exec2c
#

Modify use of PYTHON_VERSION so it also allows the user to prefix the version number with "python".

Not only, so that user can specify any even less common python implementation via this variable: https://wiki.python.org/moin/PythonImplementations
https://www.python.org/download/alternatives

from kat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.