Discussion:
Help for makefiles
Anmol Mishra
2018-06-13 20:06:48 UTC
Permalink
Greetings,
I am an open source contributor and doing Google Summer Of Code 2018 at
Sugar Labs. I would like to know that I have a repository that was earlier
working fat python2 and my makefile were installing it correctly, now we
have moved forward to provide our package dual compatibility in Python 2
and Python 3, whole code is ready but I seek help for How to make the
suitable changes that my changes in makefile gets adapted in such a way
that my package will be installed in python 2 or python 3 directory
depending on the version available on system. Your precious help and
guidance will be highly appreciated.

Regards
Anmol Mishra
(IRC-octamois)
Bob Friesenhahn
2018-06-13 21:24:17 UTC
Permalink
Post by Anmol Mishra
Greetings,
I am an open source contributor and doing Google Summer Of Code 2018 at
Sugar Labs. I would like to know that I have a repository that was earlier
working fat python2 and my makefile were installing it correctly, now we
have moved forward to provide our package dual compatibility in Python 2
and Python 3, whole code is ready but I seek help for How to make the
suitable changes that my changes in makefile gets adapted in such a way
that my package will be installed in python 2 or python 3 directory
depending on the version available on system. Your precious help and
guidance will be highly appreciated.
I suggest adding support for --with-python=[=PYTHON] to your package's
configure script, It should use /usr/bin/python by default, or the
program specified by the PYTHON environment variable, or perhaps the
'python' which occurs first in the executable search path.

It should be possible to do something like

./configure --with-python=/my/python5.78

In order to allow a specific python to be used.

Two builds would be required to support both python2 and python3 on
the same host.

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Anmol Mishra
2018-06-14 06:50:09 UTC
Permalink
I was thinking if I can check for both which version of Python is currently
available like 2 or 3, installation proceed with that.
PYTHON= python2.6, does this mean that it will be installed with Python 3
as well?
Post by Anmol Mishra
Post by Anmol Mishra
Greetings,
I am an open source contributor and doing Google Summer Of Code 2018 at
Sugar Labs. I would like to know that I have a repository that was
earlier
Post by Anmol Mishra
working fat python2 and my makefile were installing it correctly, now we
have moved forward to provide our package dual compatibility in Python 2
and Python 3, whole code is ready but I seek help for How to make the
suitable changes that my changes in makefile gets adapted in such a way
that my package will be installed in python 2 or python 3 directory
depending on the version available on system. Your precious help and
guidance will be highly appreciated.
I suggest adding support for --with-python=[=PYTHON] to your package's
configure script, It should use /usr/bin/python by default, or the
program specified by the PYTHON environment variable, or perhaps the
'python' which occurs first in the executable search path.
It should be possible to do something like
./configure --with-python=/my/python5.78
In order to allow a specific python to be used.
Two builds would be required to support both python2 and python3 on
the same host.
Bob
--
Bob Friesenhahn
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Bob Friesenhahn
2018-06-14 12:52:39 UTC
Permalink
Post by Anmol Mishra
I was thinking if I can check for both which version of Python is currently
available like 2 or 3, installation proceed with that.
PYTHON= python2.6, does this mean that it will be installed with Python 3
as well?
Python may be installed several times on the same system. Sometimes
it may appear to be installed several more times due to execution
environments like 'virtualenv' (a package which helps avoid altering
the formal Python installation tree).

Usually building for a particular Python also involves installing
files into the Python installation tree, polluting files which were
installed using an OS package installer, and possibly even overwriting
files. Installing unmanaged files into a directory with managed files
is not a decision to be taken lightly.

The person doing the build should have complete control over which
Python is being used and know in advance what will be done.

Installing for 'python2.6' should only install for 'python2.6' and not
some other version.

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Loading...