Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Issues with the command "boa build" with --pyproject-recipes #389

Open
onurbingol opened this issue Dec 22, 2023 · 0 comments
Open

Issues with the command "boa build" with --pyproject-recipes #389

onurbingol opened this issue Dec 22, 2023 · 0 comments

Comments

@onurbingol
Copy link

Hello,

Previously, a way to include recipe.yaml data in pyproject.toml was shared (reference: #345 (comment))

I think this is a great method to reuse the build variables, as many of us still build the wheels along with the conda packages.

I am afraid I stumbled on a couple of issues

  1. When using python < 3.11, boa is supposed to import another TOML library, toml, but instead it raises a ModuleNotFound error (tested on Py v3.8). It looks like the code is there on render.py (https://github.com/mamba-org/boa/blob/main/boa/core/render.py#L178), but it won't check for ModuleNotFound exception.
  2. Would it be possible to add support for tomli? It looks like many packages use tomli instead of toml, and according to their comparison, tomli is faster than toml. It feels like when it comes to faster, it suits to boa's purpose as well.
  3. This might be a bit complex to explain, but let's say I have the following snippet from pyptoject.toml
[build-system]
build-backend = "setuptools.build_meta"
requires = [
    "setuptools",
    "wheel"
]

[project]
name = "abc-xyz"
description = " I am the example!"
license = { file = "LICENSE" }
readme = "README.md"
classifiers = [
    "Programming Language :: Python :: 3",
    "Operating System :: OS Independent"
]
requires-python = ">=3.8"
dynamic = ["version"]

[tool.setuptools.dynamic]
version = { file = "VERSION" }

[tool.boa.package]
name = "{{ pyproject.project.name }}"
version = "{{ pyproject.project.version }}"

In this situation, where version is set to dynamic and read from a file named VERSION, the version field under tool.boa.package is not populated from the variable {{ pyproject.project.version }}. Do you think there is a way to make this working?

Thanks in advance!

@onurbingol onurbingol changed the title Issues with the command "boa build with --pyproject-recipes ." Issues with the command "boa build" with --pyproject-recipes Jan 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant