[gimp-web] Update various files to be about Python 3 only.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web] Update various files to be about Python 3 only.
- Date: Fri, 1 Oct 2021 01:02:52 +0000 (UTC)
commit da092f7332a911c4aa176bff9f28d0bdf4b0f38b
Author: Jehan <jehan girinstud io>
Date: Fri Oct 1 02:58:51 2021 +0200
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/index.md: update various info to Python 3 instead
of v2.
README.md | 35 +++++++++++++++--------------------
content/about/meta/index.md | 13 ++++---------
py2-requirements.txt | 6 ------
3 files changed, 19 insertions(+), 35 deletions(-)
---
diff --git a/README.md b/README.md
index 3068af64..f9291fa7 100644
--- a/README.md
+++ b/README.md
@@ -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](https://docs.python.org/3/library/venv.html).
```
python3 -m venv py3-venv
@@ -65,24 +65,10 @@ typogrify==2.0.7
Unidecode==1.1.1
```
-
-#### PYTHON 3 MIGRATION
-
-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. pelicanconf.local.py - 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 pelicanconf.py`
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 pelicanconf.local.py
+```
+
+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.
diff --git a/content/about/meta/index.md b/content/about/meta/index.md
index aa5cef97..233fe389 100644
--- a/content/about/meta/index.md
+++ b/content/about/meta/index.md
@@ -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](https://docs.getpelican.com/en/stable/).
-
### 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:
`localhost:8000`
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]