Skip to content

Update default python version #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fa49f4f
set default Python version to 3.7
gronke Mar 21, 2020
74146ef
describe how to install libioc from Makefile for other Python versions
gronke Mar 21, 2020
9b0ebcc
Rename Iocage Handbook to Ioc Handbook in README
gronke Mar 21, 2020
7613cae
detect latest available Python 3 version as default in Makefile
gronke Apr 13, 2020
e1efe34
install dev-dependencies with selected Python version
gronke Apr 13, 2020
0b6a71d
update Python dependencies to latest freebsd_sysctl and jail
gronke Apr 13, 2020
4f55423
accept PYTHON_VERSION env variable in Makefile
gronke Apr 13, 2020
28e715c
update Travis Python version to 3.7
gronke Apr 13, 2020
c6620cc
fall back to TRAVIS_PYTHON_VERSION in Makefile
gronke Apr 13, 2020
02b3780
respect TRAVIS_PYTHON_VERSION in install travis make task
gronke Apr 13, 2020
0771520
print mypy version in make check task
gronke Apr 13, 2020
820afc7
run FreeBSD 12.1 on Cirrus CI
gronke Apr 13, 2020
9e05bcf
explicitly type fcntl.ioctl function
gronke Apr 13, 2020
2906aa4
update py-jail dependency to 0.0.11
gronke Apr 13, 2020
b5a7243
disable ZFS mnttab_cache
gronke Apr 20, 2020
e37489e
chore: look for mountpoint, not dataset name in tests
gronke Apr 20, 2020
71f058e
suppress pkg warnings with IGNORE_OSVERSION=yes on host pkg update
gronke Apr 20, 2020
a1ec49a
chore: print system info and config in Cirrus CI install task
gronke Apr 20, 2020
eba2847
tests: skip VNET tests when if_epair is not loaded
gronke Apr 20, 2020
aa39e1a
document what the Make string replacement expression does
igalic Apr 7, 2020
71690e9
update python version in .travis and setup.cfg
igalic Apr 12, 2020
2c95e2b
we don't need cython to build, but we do need setuptools!
igalic Apr 7, 2020
77f7229
update FreeBSD release on cirrus ci as well!
igalic Apr 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ JAIL_NIC?=vtnet0
JAIL_IP?=172.16.0
JAIL_NET?=16
MYPYPATH = $(shell pwd)/.travis/mypy-stubs
PYTHON ?= python3.6

LATEST_PKG_PYTHON_VERSION != pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'
PYTHON ?= python${LATEST_PKG_PYTHON_VERSION}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should still have a fallback, since we use this makefile on Travis, too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit complicated. There are multiple layers of overrides happening here.

PYTHON_VERSION ?= $(TRAVIS_PYTHON_VERSION)
SELECTED_PYTHON_VERSION != if [ "$(PYTHON_VERSION)" != "" ]; then echo $(PYTHON_VERSION); else pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'; fi
PYTHON ?= python${SELECTED_PYTHON_VERSION}
pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/}

1.) When no PYTHON_VERSION was set, use TRAVIS_PYTHON_VERSION
2.) If neither was set, guess SELECTED_PYTHON_VERSION using pkg info
3.) This all can be overwritten via PYTHON.
4.) Read numeric pyver of whatever version was selected

pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that we already have LATEST_PYTHON_VERSION we can use this directly here


.if $(pyver) < 35
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ cd libioc
make install
```

At the current time libiocage is not packaged or available in FreeBSD ports.
The default Python version is 3.7. If you intend to run libioc from another version, please specify it during the installation:

```sh
make PYTHON=python3.8 install
```

At the current time libioc is not packaged or available in FreeBSD ports.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not entirely true…
https://www.freshports.org/devel/py-libioc it just… still doesn't have all the right dependencies…

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, let's tackle this at a different time. Would you open an Issue as a reminder? 💜


## Documentation

- Iocage Handbook: https://bsdci.github.io/handbook
- Ioc Handbook: https://bsdci.github.io/handbook
- Reference Documentation: https://bsdci.github.io/libioc
- Gitter Chat: https://gitter.im/libioc/community

Expand Down