diff --git a/Makefile b/Makefile index 5d51fa4..52e5bfc 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,10 @@ clean: rm -rf ~/Applications/$(PROJECT_NAME)*; \ rm -f Scientific-Python-*.pkg; \ elif [[ $(MACHINE) == "Linux" ]]; then \ - rm -rf $(HOME)/Scientific-Python; \ + rm -rf $(HOME)/Scientific-Python-Environment; \ rm -f ./Scientific-Python-*.sh; \ - rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)-*.desktop; \ + rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)*.desktop; \ + rm -f $(HOME)/.local/share/desktop-directories/$(PROJECT_NAME_LOWER).directory; \ elif [[ $(MACHINE) == "Windows" ]]; then \ echo "TODO add command to cleanup icons on Windows"; \ fi diff --git a/environment.yml b/environment.yml index d219642..511caa2 100644 --- a/environment.yml +++ b/environment.yml @@ -7,7 +7,9 @@ dependencies: - constructor >=3.6.0 - conda-libmamba-solver - conda-standalone >=23.11.0,!=24.11.0 - - menuinst - conda >=23.11.0 - fmt !=10.2.0 - conda-build + - pip: + # ↓ TODO after menuinst release (something >2.3.1), move to normal dependencies list + - git+https://github.com/conda/menuinst.git@3d11307485f8de8b813e2cec6866e2c00aee11da diff --git a/recipes/scientific-python/construct.yaml b/recipes/scientific-python/construct.yaml index 64313a9..c4d0bd8 100644 --- a/recipes/scientific-python/construct.yaml +++ b/recipes/scientific-python/construct.yaml @@ -55,59 +55,59 @@ specs: # Python - python =3.13.3 # [not (osx and arm64)] - python =3.13.2 # [osx and arm64] # allow_outdated - - pip =25.1.1 + - pip =25.2 - wheel =0.45.1 - - conda =25.5.0 - - mamba =2.1.1 + - conda =25.5.1 + - mamba =2.3.1 - threadpoolctl =3.6.0 # for our sysinfo menu command # Menus - sp-installer-menu =0.1.0 # Scientific Python - - scipy =1.15.2 + - scipy =1.16.0 - numpy =2.1.3 # allow_outdated, each new version has to wait for numba - openblas =0.3.28 # allow_outdated, NumPy etc. need to update - libblas =3.9.0=*openblas # Web - - requests =2.32.3 + - requests =2.32.4 - pooch =1.8.2 # Data science and statistics. - - pandas =2.2.3 - - polars =1.30.0 - - scikit-learn =1.6.1 - - statsmodels =0.14.4 + - pandas =2.3.1 + - polars =1.31.0 + - scikit-learn =1.7.1 + - statsmodels =0.14.5 - pingouin =0.5.5 # https://pingouin-stats.org # Jupyter - jupyter =1.1.1 - - jupyterlab =4.4.3 + - jupyterlab =4.4.5 - nbclassic =1.3.1 - - ipykernel =6.29.5 + - ipykernel =6.30.0 # I/O - openpyxl =3.1.5 - xlrd =2.0.1 - - pyreadstat =1.2.9 # https://github.com/Roche/pyreadstat + - pyreadstat =1.3.0 # https://github.com/Roche/pyreadstat # Image processing - scikit-image =0.25.2 - - pillow =11.2.1 + - pillow =11.3.0 # Symbolic math - sympy =1.14.0 # Viz - - matplotlib =3.10.3 + - matplotlib =3.10.5 - ipympl =0.9.7 - seaborn =0.13.2 - - plotly =6.1.2 + - plotly =6.2.0 - ipywidgets =8.1.7 - termcolor =3.1.0 # Security - defusedxml =0.7.1 # https://github.com/tiran/defusedxml # Development - - cython =3.1.1 - - pytest =8.4.0 + - cython =3.1.2 + - pytest =8.4.1 - pytest-timeout =2.4.0 - pre-commit =4.2.0 - - ruff =0.11.12 - - uv =0.7.9 + - ruff =0.12.7 + - uv =0.8.4 # Doc building - - numpydoc =1.8.0 + - numpydoc =1.9.0 # OS-specific - git =2.49.0 # [win] - make =4.4.1 # [win] diff --git a/sp-installer-menu/make_menu.py b/sp-installer-menu/make_menu.py index fa4d7ad..cced88b 100755 --- a/sp-installer-menu/make_menu.py +++ b/sp-installer-menu/make_menu.py @@ -16,6 +16,7 @@ out_path = Path(prefix) / "Menu" pkg_name = environ["PKG_NAME"] pkg_version = environ["PKG_VERSION"] +folder_and_category_name = environ["MENU_FOLDER_NAME"] # defined in `meta.yaml` if not out_path.is_dir(): out_path.mkdir(parents=True) @@ -30,6 +31,7 @@ def txt_replace(txt): ("#PREFIX#", prefix), ("#PKG_NAME#", pkg_name), ("#PKG_VERSION#", pkg_version), + ("#FOLDER_AND_CATEGORY_NAME#", folder_and_category_name), ): txt = txt.replace(start, end) return txt @@ -39,14 +41,15 @@ def txt_replace(txt): (out_path / f"{pkg_name}.json").write_text(txt_replace(menu_txt)) -for fstem in ("console", "info", "web", "forum", 'jupyter'): +for fstem in ("console", "info", "web", "forum", "jupyter"): for ext in ("icns", "ico", "png"): copy2(in_path / f"{fstem}.{ext}", out_path / f"{pkg_name}_{fstem}.{ext}") for ext in ("sh", "applescript", "bat"): - for fpath in in_path.glob(f'*.{ext}'): + for fpath in in_path.glob(f"*.{ext}"): (out_path / f"{pkg_name}_{fpath.name}").write_text( - txt_replace(fpath.read_text())) + txt_replace(fpath.read_text()) + ) for fname in ("spi_sys_info.py", "spi_mac_folder_icon.png"): copy2(in_path / fname, out_path / fname) diff --git a/sp-installer-menu/menu/menu.json b/sp-installer-menu/menu/menu.json index a601ba1..5134da8 100644 --- a/sp-installer-menu/menu/menu.json +++ b/sp-installer-menu/menu/menu.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://schemas.conda.io/menuinst-1.schema.json", - "menu_name": "Scientific Python (#PKG_VERSION#)", + "menu_name": "#FOLDER_AND_CATEGORY_NAME#", "menu_items": [{ "name": "Scientific Python Environment Info", "description": "Information on the Scientific Python runtime environment", @@ -18,7 +18,7 @@ }, "linux": { "Categories": [ - "Science" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { @@ -52,7 +52,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_prompt.sh" ], "Categories": [ - "Science" + "#FOLDER_AND_CATEGORY_NAME#" ], "terminal": true }, @@ -92,7 +92,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_jupyterlab.sh" ], "Categories": [ - "Science" + "#FOLDER_AND_CATEGORY_NAME#" ], "terminal": true }, @@ -129,7 +129,7 @@ "https://lectures.scientific-python.org" ], "Categories": [ - "Science" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { @@ -164,7 +164,7 @@ "https://discuss.scientific-python.org" ], "Categories": [ - "Science" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { diff --git a/sp-installer-menu/menu/open_prompt.sh b/sp-installer-menu/menu/open_prompt.sh index 0c94f72..4928d0b 100755 --- a/sp-installer-menu/menu/open_prompt.sh +++ b/sp-installer-menu/menu/open_prompt.sh @@ -12,4 +12,4 @@ echo "Using $(python --version) from $(which python)" echo "This is Scientific Python version #PKG_VERSION#" workdir="$HOME/Documents/scientific-python" mkdir -p $workdir -pushd $workdir +pushd $workdir > /dev/null diff --git a/sp-installer-menu/menu/spi_sys_info.py b/sp-installer-menu/menu/spi_sys_info.py index 00486a6..176c980 100755 --- a/sp-installer-menu/menu/spi_sys_info.py +++ b/sp-installer-menu/menu/spi_sys_info.py @@ -13,7 +13,7 @@ from importlib import import_module from importlib.metadata import metadata -from os import sep +from os import linesep from xml.etree import ElementTree @@ -149,7 +149,7 @@ def main(): if len(sys.argv) > 1 and sys.argv[1] == "nohtml": print() # blank line - print(sep.join(out), file=sys.stdout) + print(linesep.join(out), file=sys.stdout) return # build the output tree diff --git a/sp-installer-menu/meta.yaml b/sp-installer-menu/meta.yaml index 5effbe5..3d24085 100644 --- a/sp-installer-menu/meta.yaml +++ b/sp-installer-menu/meta.yaml @@ -11,6 +11,8 @@ build: number: {{ build }} # skip: true # [not linux] noarch: python + script_env: + - MENU_FOLDER_NAME=Scientific Python script: - pushd {{ RECIPE_DIR }} - python make_menu.py