Port wants python27 but I have python37 installed

Just wondering if anyone can help me with installing some ports.

I'm trying to install Postfix, part of its dependencies are mysql56-client-->cmake-->jsconcpp-->scons-->py27-setuptools-->python27

I already have Python 37 installed and don't want python 27 or its setuptools being installed.

Is there some way I can get scons to install using the already installed python37?

I have this in /etc/make.conf at the moment.
Code:
DEFAULT_VERSIONS+=perl5=5.28
DEFAULT_VERSIONS+=python=3.7
DEFAULT_VERSIONS+=python3=python=3.7
Thanks
 
devel/scons appears to have a hard dependency on Python 2.7:
Code:
USES= python:2.7 shebangfix
I'm betting the code doesn't work with 3.x, which is why it's forced to 2.7.
 
FreeBSD uses Python2.7 for the base system in many places. You can use Python3 as well, but removing, or not having the 2.7 version as the default one causes many problems (experience speaking here). I'd use/install the default for a build like this (because this will work) and install/use Python3 in a virtualenv for development.
 
Assuming you're using 3.7 for your own scripting needs, you can have both versions installed in parallel.

Otherwise, remove 3.7 and keep 2.7 only. Many ports still depend on 2.7.
 
It's not so bad if you use virtual environments. For years I had 2.7 as the default version because of ports requirements, but I had 3.x installed as well. Then whenever I had a new project to code I just made a venv for it using python3 -m venv venv. Then you can install stuff using ./venv/bin/pip install <blah>, and use #!./venv/bin/python as your interpreter which will use the things you've installed using that version of pip. Completely separate to the ports system and lets you do what you want to do.

However, personally for me everything that I want to use via ports *does* build and run using 3.x. So I have now changed the default version to 3 and it works well anyway.
 
This port is B-dep
I don't think so, it would have to be USES= python:2.7,build if it was only a build dependency. If it was a build dependency you would indeed be able to remove it once the port has been built.

Just confirmed it, it's a run dependency:
Code:
root@molly:/usr/local/poudriere/ports/default/devel/scons # make run-depends-list
/usr/local/poudriere/ports/default/devel/m4
/usr/local/poudriere/ports/default/devel/py-setuptools
/usr/local/poudriere/ports/default/lang/python27
 
I don't think so, it would have to be USES= python:2.7,build if it was only a build dependency. If it was a build dependency you would indeed be able to remove it once the port has been built.

I kept in mind scons, it's just a make alternative, so I doubt it can be the run dependency.
 
Can't comment on that but if that's the case the port is configured incorrectly because it's now listed as both a build and run dependency.
 
Back
Top