Skip to content

Commit f713321

Browse files
committed
Update config files
Update config files to install specific versions of cython and PyYAML depedencies. Also, activate conda environment in setup-environment, build-package and generate-conda-metadata steps
1 parent 6fbeb41 commit f713321

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

build.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ mkdir -p build dist
77
echo "Cleaning up old versions..."
88
rm -rf ./build/* ./dist/* ./Example_Python_Package.egg-info
99
echo "Building package for distribution..."
10-
CONDA_BASE=$(conda info --base)
11-
source "${CONDA_BASE}/etc/profile.d/conda.sh"
12-
conda create -n coast-toolbox python=3.10
13-
conda activate coast-toolbox
14-
conda install conda-forge::hdf5
15-
./venv/bin/python ./setup.py sdist bdist_wheel
10+
conda activate coast
11+
python ./setup.py sdist bdist_wheel
1612

17-
echo "Done!"
13+
echo "Done!"

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- nodefaults
55
dependencies:
66
- python==3.10
7-
- cython<3.0.0
7+
- cython==0.29.37
88
- cartopy==0.23.0
99
- gsw==3.6.19
1010
- xarray[complete]==2023.7.0
@@ -31,5 +31,5 @@ dependencies:
3131
- spyder==6.0.7
3232
- jupyterlab==4.4.3
3333
- aiohttp==3.11.13
34-
- PyYAML==6.0
34+
- PyYAML==5.4.1
3535
- oyaml==1.0

generate_conda_meta.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
2+
conda activate coast
33
python setup.py conda

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"keywords": ["NEMO", "shallow water", "ocean assessment"],
3232
"project_urls": {"documentation": "https://british-oceanographic-data-centre.github.io/COAsT/"},
3333
"install_requires": [
34-
"cython<3.0.0",
35-
"PyYAML==6.0",
34+
"cython==0.29.37",
35+
"PyYAML==5.4.1",
3636
"oyaml==1.0",
3737
"pytest==7.1.1",
3838
"pytest-mock==3.7.0",

setup_environment.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ cd "$(dirname "$0")" # Set working directory
55

66
echo "Cleaning up any existing virtual environment..."
77
rm -rf ./venv
8-
echo "Creating new virtual environment..."
9-
python3 -m virtualenv ./venv
108
echo "Installing required packages..."
11-
./venv/bin/pip install setuptools wheel twine
12-
CONDA_BASE=$(conda info --base)
13-
source "${CONDA_BASE}/etc/profile.d/conda.sh"
14-
conda config --set verbosity 3 --env
15-
conda env update --prune --file environment.yml
169
conda activate coast
10+
conda install conda-forge::setuptools conda-forge::wheel conda-forge::twine
1711

18-
echo "Done!"
12+
echo "Done!"

0 commit comments

Comments
 (0)