Skip to content

Commit

Permalink
fix: update conda and pip builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AngRodrigues committed Dec 16, 2024
1 parent 6fa0705 commit 96399fe
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting_and_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
conda install -c conda-forge -c loop3d --file dependencies.txt -y
conda install pytest -y
conda install gdal pytest -y
- name: Install map2loop
run: |
Expand Down
1 change: 1 addition & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
python:
- 3.8
- 3.9
- 3.10
- 3.11
Expand Down
17 changes: 10 additions & 7 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{% set name = "map2loop" %}


package:
name: "{{ name|lower }}"
version: "{{ environ.get('GIT_DESCRIBE_TAG', '') }}"

source:
git_url: https://github.com/Loop3D/map2loop


build:
number: 0
script: "{{ PYTHON }} -m pip install ."
script: "{{ PYTHON }} -m pip install . --no-deps"

requirements:
host:
- pip
- python
run:
- loopprojectfile ==0.2.2
- gdal
- map2model
- beartype
- python
- numpy
- pandas
Expand All @@ -25,11 +29,6 @@ requirements:
- tqdm
- networkx
- owslib
- loopprojectfile==v0.2.1
- map2model
- beartype
- gdal=3.8.4



about:
Expand All @@ -42,3 +41,7 @@ about:
extra:
recipe-maintainers:
- lachlangrose

channels:
- loop3d
- conda-forge
8 changes: 5 additions & 3 deletions dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

numpy
scipy
geopandas
shapely
networkx
owslib
map2model
loopprojectfile==v0.2.1
loopprojectfile==0.2.2
beartype
gdal==3.8.4
pytest
scikit-learn


scikit-learn
1 change: 1 addition & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ COPY dependencies.txt dependenciesdocs.txt

RUN cat ./docs/requirements.txt >> dependenciesdocs.txt
RUN conda install -c conda-forge -c loop3d --file dependenciesdocs.txt -y
RUN conda install gdal -y

RUN pip install .

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ Documentation = 'https://Loop3d.org/map2loop/'
"Source Code" = 'https://github.com/Loop3D/map2loop'

[tool.setuptools.dynamic]
dependencies = {file = ["dependencies.txt"]}
version = { attr = 'map2loop.version.__version__' }
dependencies = { file = ["dependencies.txt"]}
version = { attr = "map2loop.version.__version__" }

[tool.setuptools.packages.find]
include = ['map2loop', 'map2loop.*']




[tool.black]
line-length = 100
skip-string-normalization = true
Expand Down
19 changes: 17 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
"""See pyproject.toml for project metadata."""

from setuptools import setup
import os
from setuptools import setup

package_root = os.path.abspath(os.path.dirname(__file__))

# Get the version from the version.py file
version = {}
with open(os.path.join(package_root, "map2loop/version.py")) as fp:
exec(fp.read(), version)
version = version["__version__"]

setup()
# Read dependencies from dependencies.txt
requirements_file = os.path.join(package_root, "dependencies.txt")
with open(requirements_file, 'r') as f:
install_requires = [line.strip() for line in f if line.strip()]

setup(
name="map2loop",
install_requires=install_requires,
version=version,
license="MIT",
package_data={
# Include test files:
'': ['tests/*.py'],
},
)

0 comments on commit 96399fe

Please sign in to comment.