Skip to content

Commit c999d98

Browse files
authored
Merge pull request #121 from alan-turing-institute/pyyaml-install-docs
Pyyaml install docs
2 parents d9c95a2 + 25711f0 commit c999d98

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

.github/workflows/pre-commit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
shell: bash
4141
if: steps.poetry-cache.outputs.cache-hit != 'true'
4242
run: |
43+
# workaround start
44+
# this is a pyyaml v5 vs cython v3 conflict workaround
45+
# see https://github.com/alan-turing-institute/sqlsynthgen/issues/120
46+
python -m poetry run pip install "cython<3"
47+
python -m poetry run pip install wheel
48+
python -m poetry run pip install --no-build-isolation "pyyaml==5.4.1"
49+
# workaround end
4350
python -m poetry install --all-extras
4451
- name: Install Pre-Commit
4552
shell: bash

.github/workflows/tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ jobs:
4646
shell: bash
4747
if: steps.poetry-cache.outputs.cache-hit != 'true'
4848
run: |
49+
# workaround start
50+
# this is a pyyaml v5 vs cython v3 conflict workaround
51+
# see https://github.com/alan-turing-institute/sqlsynthgen/issues/120
52+
python -m poetry run pip install "cython<3"
53+
python -m poetry run pip install wheel
54+
python -m poetry run pip install --no-build-isolation "pyyaml==5.4.1"
55+
# workaround end
4956
python -m poetry install --all-extras
5057
- name: Create src database
5158
shell: bash

.readthedocs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ build:
1414
# nodejs: "19"
1515
# rust: "1.64"
1616
# golang: "1.19"
17+
jobs:
18+
# This pre-install job is a pyyaml v5 vs cython v3 conflict workaround
19+
# see https://github.com/alan-turing-institute/sqlsynthgen/issues/120
20+
pre_install:
21+
- pip install "cython<3"
22+
- pip install wheel
23+
- pip install --no-build-isolation "pyyaml==5.4.1"
1724

1825
# Build documentation in the docs/ directory with Sphinx
1926
sphinx:

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ Please install the following software on your workstation:
2525
poetry install --all-extras
2626
```
2727

28-
*If you don't need to [build the project documentation](#building-documentation-locally), run instead just `poetry install`*
28+
If Poetry errors when installing PyYaml, you will need to manually specify the Cython version and manually install PyYaml (this is a temporary workaround for a PyYaml v5 conflict with Cython v3, see [here](https://github.com/yaml/pyyaml/issues/601) for full details):
29+
30+
```bash
31+
poetry run pip install "cython<3"
32+
poetry run pip install wheel
33+
poetry run pip install --no-build-isolation "pyyaml==5.4.1"
34+
poetry install --all-extras
35+
```
36+
37+
*If you don't need to [build the project documentation](#building-documentation-locally), run instead just `poetry install`.*
2938
3039
1. Install the git hook scripts. They will run whenever you perform a commit:
3140

docs/source/installation.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ Installation
66
End User
77
--------
88

9-
To use sqlsynthgen, first install it:
9+
To use SqlSynthGen, first install it:
1010

1111
.. code-block:: console
1212
1313
$ pip install sqlsynthgen
1414
15-
and check that you can view the help message with:
15+
16+
If Pip errors when installing PyYaml, you will need to manually specify the Cython version and manually install PyYaml (this is a temporary workaround for a PyYaml v5 conflict with Cython v3, see `here <https://github.com/yaml/pyyaml/issues/601>`_ for full details):
17+
18+
.. code-block:: console
19+
20+
pip install "cython<3"
21+
pip install wheel
22+
pip install --no-build-isolation "pyyaml==5.4.1"
23+
pip install sqlsynthgen
24+
25+
Check that you can view the help message with:
1626

1727
.. code-block:: console
1828

0 commit comments

Comments
 (0)