Commit da092f73 authored by Jehan's avatar Jehan
Browse files

Update various files to be about Python 3 only.

Now that the migration to Python 3 is finished, we should not talk about
Python 2, which is not supported anymore.

- get rid of outdated py2-requirements.txt file.
- README: remove "PYTHON 3 MIGRATION" outdated section (it's now done)
  and update various other info.
- content/about/meta/ update various info to Python 3 instead
  of v2.
parent dc727cb9
Pipeline #321845 failed with stage
in 30 minutes and 41 seconds
......@@ -22,7 +22,7 @@ The tools to build and test the site are Python, Pelican, and a couple of module
### Getting the build environment
1. Install Python 3.x. (Tested and working on at least 3.5.7).
1. Install Python 3.x.
For sanity, it is recommended to use a [virtual environment](
python3 -m venv py3-venv
......@@ -65,24 +65,10 @@ typogrify==2.0.7
We are migrating to Python 3! Also, yikes!
Currently building on `Python 3.6.4` and `Pelican 4.0.1`.
This is on branch `migrate/py3`.
It's easiest to use a virtual environment to work in this, so once you've sorted out Python 3.6.4 being installed, you can run:
python3 -m venv py3-venv
This will make the virtual environment folder at `py3-venv`, which is already in `.gitignore`.
To activate, as usual, `source py3-venv/bin/activate`.
To de-activate, `deactivate`.
*Note: these are a snapshot at a point in time. The website has been
known to build fine with newer versions too. For instance, as of
2021-10-01, using Python 3.9.7 and recent versions of most dependencies
worked fine too.*
#### Windows Environment Variables
......@@ -108,7 +94,7 @@ There are four versions in our directory for various needs.
4. - this is a settings file tailored for a local build and test environment.
Unless you are monkeying with site-wide build settings, you shouldn't normally have to edit these files.
If you do, please consult schumaml or patdavid before pushing to be sure.
If you do, please consult Jehan, schumaml or patdavid before pushing to be sure.
### Building the site
......@@ -118,6 +104,15 @@ From the project directory, you can invoke pelican:
`pelican -s`
This will build the site into a directory called `output`. Use one of the pelicanconfig files mentioned above depending on what version of the site you want to build.
For instance, if you are modifying the website and want to test locally,
you will probably want to build instead with:
pelican -s
This will allow in particular to view the local website with proper
relative links and non-broken images.
You can also use `make` to build the site: `make html`, `make testing`, `make static` or `make local` invoke the build for the corresponding version.
......@@ -29,19 +29,16 @@ This is the same procedure anyone can use to test new content they would like to
### Getting a build environment
1. Install [Python].
2.7.x is best, earlier versions are not supported.
Only provisional support for 3.3+.
1. Install [Python] 3.
2. Install [Pelican].
Simplest method is simply: `pip install pelican==3.6.2`
The version of Pelican the server uses is `3.6.2`.
Use this version for now to stay in sync with pentagon (the server).
3. Install some extra components:
You cane use the `py2-requirements.txt` file to install all the requirements at once:
`pip install -r py2-requirements.txt`.
You can use the `py3-requirements.txt` file to install all the requirements at once:
`pip install -r py3-requirements.txt`.
* For [Markdown] support:
`pip install Markdown`
For Python 2, use `pip install Markdown==2.6.6`
* For fancy typography elements with [typogrify]:
`pip install typogrify`
* For some html scraping for the mirrors list [Beautifulsoup4]:
......@@ -49,11 +46,9 @@ This is the same procedure anyone can use to test new content they would like to
* For ip geolocating (for the gimp-mirrors plugin), pygeoip:
`pip install pygeoip`
For detailed information refer to the [Pelican documentation](
### Building the site
Building the site is relatively straightforward:
......@@ -82,7 +77,7 @@ For Python 2:
For Python 3:
`cd output`
`python m http.server`
`python -m http.server`
The site can then be accessed locally at:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment