@@ -26,62 +26,6 @@ guide found online. It is assumed the commands shown in this part of the README
2626executed in the root directory of this repo once it has been cloned to your local
2727machine.
2828
29- ## Python Version Management (pyenv)
30-
31- To start, install [ pyenv] ( https://github.com/pyenv/pyenv ) . There is a Windows version of
32- this tool ([ pyenv-win] ( https://github.com/pyenv-win/pyenv-win ) ), however this is
33- currently untested on this repo. This is used to manage the various versions of Python
34- that will be used to test/lint Python during development. Install by executing the
35- following:
36-
37- ``` bash
38- curl https://pyenv.run | bash
39- ```
40-
41- The following lines need to be added to ` ~/.bashrc ` - either open a new terminal or
42- execute ` source ~/.bashrc ` to make these changes apply:
43-
44- ``` bash
45- export PATH=" ~/.pyenv/bin:$PATH "
46- eval " $( pyenv init -) "
47- eval " $( pyenv virtualenv-init -) "
48- ```
49-
50- Various Python build dependencies need to be installed next. These will vary dependent
51- on the platform of your system (see the
52- [ common pyenv build problems] ( https://github.com/pyenv/pyenv/wiki/Common-build-problems )
53- for the relevant command for your OS), but the following shows the bash command to
54- install the requirements for a CentOS/RHEL machine:
55-
56- ``` bash
57- sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
58- sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
59- ```
60-
61- To make use of ` pyenv ` , let's install different versions of Python onto the system. In
62- production, DataGateway API uses Python 3.10, so this should definitely be part a
63- development environment for this repo. This stage might take some time as each Python
64- version needs to be downloaded and built individually:
65-
66- ``` bash
67- pyenv install 3.10.0
68- ```
69-
70- To verify the installation commands worked:
71-
72- ``` bash
73- python3.10 --version
74- ```
75-
76- These Python versions need to be made available to local version of the repository. They
77- will used during the Nox sessions, explained further down this file. Executing the
78- following command will create a ` .python-version ` file inside the repo (this file is
79- currently listed in ` .gitignore ` ):
80-
81- ``` bash
82- pyenv local 3.10.0
83- ```
84-
8529## API Dependency Management (Poetry)
8630
8731To maintain records of the API's dependencies,
@@ -218,27 +162,14 @@ As a summary, these are the steps needed to create a dev environment for this re
218162compressed into a single code block:
219163
220164``` bash
221- # Install pyenv
222- curl https://pyenv.run | bash
223-
224- # Paste into ~/.bashrc
225- export PATH=" ~/.pyenv/bin:$PATH "
226- eval " $( pyenv init -) "
227- eval " $( pyenv virtualenv-init -) "
228-
229- # Apply changes made in ~/.bashrc
230- source ~ /.bashrc
231-
232- # Install Python build tools
233- sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
234- sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
165+ # Install Python 3.10
235166
236- # Install different versions of Python and verify they work
237- pyenv install 3.10.0
238- python3.10 -- version
167+ # Download and install Python 3.10 from the official Python website or use your system’s package manager (e.g., apt for Linux, Homebrew for macOS, or the installer for Windows).
168+ # Make sure Python is added to your system PATH.
169+ # Verify the installation by checking the version.
239170
240- # Make installed Python versions available to repo
241- pyenv local 3.10.0
171+ # To verify the installation commands worked:
172+ python3 --version
242173
243174# Install Poetry
244175curl -sSL https://install.python-poetry.org | python3 -
0 commit comments