Name | pyproject2conda JSON |
Version |
0.18.0
JSON |
| download |
home_page | None |
Summary | A script to convert a Python project declared on a pyproject.toml to a conda environment. |
upload_time | 2025-01-24 17:40:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <3.14,>=3.8 |
license | NIST-PD |
keywords |
pyproject2conda
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!-- markdownlint-disable MD041 -->
[![Repo][repo-badge]][repo-link] [![Docs][docs-badge]][docs-link]
[![PyPI license][license-badge]][license-link]
[![PyPI version][pypi-badge]][pypi-link]
[![Conda (channel only)][conda-badge]][conda-link]
[![Code style: black][black-badge]][black-link]
<!--
For more badges, see
https://shields.io/category/other
https://naereen.github.io/badges/
[pypi-badge]: https://badge.fury.io/py/pyproject2conda
-->
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]: https://github.com/psf/black
[pypi-badge]: https://img.shields.io/pypi/v/pyproject2conda
[pypi-link]: https://pypi.org/project/pyproject2conda
[docs-badge]: https://img.shields.io/badge/docs-sphinx-informational
[docs-link]: https://pages.nist.gov/pyproject2conda/
[repo-badge]: https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff
[repo-link]: https://github.com/usnistgov/pyproject2conda
[conda-badge]: https://img.shields.io/conda/v/conda-forge/pyproject2conda
[conda-link]: https://anaconda.org/conda-forge/pyproject2conda
[license-badge]: https://img.shields.io/pypi/l/cmomy?color=informational
[license-link]: https://github.com/usnistgov/pyproject2conda/blob/main/LICENSE
<!-- other links -->
[poetry2conda]: https://github.com/dojeda/poetry2conda
# `pyproject2conda`
A script to convert `pyproject.toml` dependencies to `environment.yaml` files.
## Overview
The main goal of `pyproject2conda` is to provide a means to keep all basic
dependency information, for both `pip` based and `conda` based environments, in
`pyproject.toml`. I often use a mix of pip and conda when developing packages,
and in my everyday workflow. Some packages just aren't available on both. If you
use poetry, I'd highly recommend [poetry2conda].
## Features
- Simple comment based syntax to add information to dependencies when creating
`environment.yaml`
## Status
This package is actively used by the author, but is still very much a work in
progress. Please feel free to create a pull request for wanted features and
suggestions!
## Quick start
<!-- start-installation -->
Use one of the following to install `pyproject2conda`:
<!-- markdownlint-disable MD014 -->
```bash
$ pip/pipx/uvx install pyproject2conda
```
or
```bash
$ conda/condax install -c conda-forge pyproject2conda
```
[rich]: https://github.com/Textualize/rich
[shellingham]: https://github.com/sarugaku/shellingham
[typer]: https://github.com/tiangolo/typer
If using pip, to install with [rich] and [shellingham] support, either install
them your self, or use:
```bash
$ pip/pipx/uvx install pyproject2conda[all]
```
<!-- markdownlint-enable MD014 -->
The conda-forge distribution of [typer] (which `pyproject2conda` uses) installs
[rich] and [shellingham] by default.
<!-- end-installation -->
## Example usage
### Basic usage
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog
import sys
sys.path.insert(0, ".")
from tools.cog_utils import wrap_command, get_pyproject, run_command, cat_lines
sys.path.pop(0)
]]] -->
<!-- [[[end]]] -->
Consider the `toml` file
[test-pyproject.toml](https://github.com/usnistgov/pyproject2conda/blob/main/tests/data/test-pyproject.toml).
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(begin=None, end="[tool.pyproject2conda]", begin_dot=False)]]] -->
```toml
[project]
name = "hello"
requires-python = ">=3.8,<3.11"
dependencies = [
"athing", #
"bthing",
"cthing; python_version < '3.10'",
]
[project.optional-dependencies]
test = [
"pandas", #
"pytest",
]
dev-extras = ["matplotlib"]
dev = ["hello[test]", "hello[dev-extras]"]
dist-pypi = [
# this is intended to be parsed with --skip-package option
"setuptools",
"build",
]
[tool.pyproject2conda.dependencies]
athing = { pip = true }
bthing = { skip = true, packages = "bthing-conda" }
cthing = { channel = "conda-forge" }
pytest = { channel = "conda-forge" }
matplotlib = { skip = true, packages = [
"additional-thing; python_version < '3.9'",
"conda-matplotlib"
] }
build = { channel = "pip" }
# ...
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
Note the table `[tool.pyproject2conda.dependencies]`. This table takes as keys
the dependency names from `project.dependencies` or
`project.optional-dependencies`, and as values a mapping with keys:
- `pip`: if `true`, specify install via pip in `environment.yaml` file
- `skip`: if `true`, skip the dependency
- `channel`: conda-channel to use for this dependency
- `packages`: Additional packages to include in `environment.yaml` file
So, if we run the following, we get:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml
channels:
- conda-forge
dependencies:
- bthing-conda
- conda-forge::cthing
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
By default, the python version is not included in the resulting conda output. To
include the specification from `pyproject.toml`, use `--python-include infer`
option:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include infer")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include infer
channels:
- conda-forge
dependencies:
- python>=3.8,<3.11
- bthing-conda
- conda-forge::cthing
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
### Specify python version
To specify a specific value of python in the output, pass a value with:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include python=3.9")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include \
python=3.9
channels:
- conda-forge
dependencies:
- python=3.9
- bthing-conda
- conda-forge::cthing
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
Note that this is for including python in the resulting environment file.
You can also constrain packages by the python version using the standard
`pyproject.toml` syntax `"...; python_version < 'some-version-number'"`. For is
parsed for both the pip packages and conda packages:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10
channels:
- conda-forge
dependencies:
- bthing-conda
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
It is common to want to specify the python version and include it in the
resulting environment file. You could, for example use:
<!-- markdownlint-disable MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10 --python-include python=3.10")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10 \
--python-include python=3.10
channels:
- conda-forge
dependencies:
- python=3.10
- bthing-conda
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
<!-- markdownlint-enable MD013 -->
Because this is common, you can also just pass the option `-p/--python`:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --python 3.10")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python 3.10
channels:
- conda-forge
dependencies:
- python=3.10
- bthing-conda
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
Passing `--python="default"` will extract the python version from
`.python-version` file. Passign `--python` value `"lowest"` or `"highest"` will
extract the lowest or highest python version, respectively, from the
`project.classifiers` table of the `pyproject.toml` file.
### Adding extra conda dependencies and pip requirements
You can also add additional conda and pip dependencies with the flags
`-d/--deps` and `-r/--reqs`, respectively. Adding the last example:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml -d dep -r req")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml -d dep -r req
channels:
- conda-forge
dependencies:
- bthing-conda
- conda-forge::cthing
- dep
- pip
- pip:
- athing
- req
```
<!-- [[[end]]] -->
These will also obey dependencies like `dep:python_version<={version}`. Pass the
flags multiple times to pass multiple dependencies.
### Command "aliases"
The name `pyproject2conda` can be a bit long to type. For this reason, the
package also ships with the alias `p2c`, which has the exact same functionality.
Additionally, the subcommands can be shortened to a unique match:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("p2c y -f tests/data/test-pyproject.toml --python 3.10")]]] -->
```bash
$ p2c y -f tests/data/test-pyproject.toml --python 3.10
channels:
- conda-forge
dependencies:
- python=3.10
- bthing-conda
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
You can also call with `python -m pyproject2conda`.
### Installing extras
Given the extra dependency:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable MD013 -->
<!-- [[[cog cat_lines(begin="[project.optional-dependencies]", end="[tool.pyproject2conda.dependencies]")]]] -->
```toml
# ...
[project.optional-dependencies]
test = [
"pandas", #
"pytest",
]
dev-extras = ["matplotlib"]
dev = ["hello[test]", "hello[dev-extras]"]
dist-pypi = [
# this is intended to be parsed with --skip-package option
"setuptools",
"build",
]
# ...
```
<!-- [[[end]]] -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
and running the following gives:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml -e test")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e test
channels:
- conda-forge
dependencies:
- bthing-conda
- conda-forge::cthing
- conda-forge::pytest
- pandas
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
`pyproject2conda` also works with self referenced dependencies:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml -e dev")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e dev
channels:
- conda-forge
dependencies:
- additional-thing
- bthing-conda
- conda-forge::cthing
- conda-forge::pytest
- conda-matplotlib
- pandas
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
### Installing from `dependency-groups`
`pyproject2conda` also support the [PEP 735](https://peps.python.org/pep-0735/)
`dependency-groups` table. For example, if we have the follinging
<!-- prettier-ignore-start -->
<!-- markdownlint-disable MD013 -->
<!-- [[[cog cat_lines(begin="[dependency-groups]", end="[tool.pyproject2conda.dependencies]", path="tests/data/test-pyproject-groups.toml")]]] -->
```toml
# ...
[dependency-groups]
test = ["pandas", "pytest"]
dev-extras = ["matplotlib"]
dev = [{ include-group = "test" }, { include-group = "dev-extras" }]
dist-pypi = [
# this is intended to be parsed with --skip-package option
"setuptools",
"build",
]
optional-opt1 = [ "hello[opt1]" ]
optional-opt2 = [ "hello[opt2]" ]
optional-all = [ "hello[all]" ]
# ...
```
<!-- [[[end]]] -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Then, we can build a requirement file, specifying groups with `-g/--group` flag.
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject-groups.toml --group dev")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject-groups.toml --group dev
channels:
- conda-forge
dependencies:
- additional-thing
- bthing-conda
- conda-forge::cthing
- conda-forge::pytest
- conda-matplotlib
- pandas
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
The advantage of using `dependency-groups` as opposed to
`package.optional-dependencies` is that they work for non-package projects, and
are not included in the metadata of distributed packages.
### Header in output
By default, `pyproject2conda` includes a header in most output files to note
that the files are auto generated. No header is included by default when writing
to standard output. To override this behavior, pass `--header/--noheader`:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml --header")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml --header
#
# This file is autogenerated by pyproject2conda
# with the following command:
#
# $ pyproject2conda yaml -f tests/data/test-pyproject.toml --header
#
# You should not manually edit this file.
# Instead edit the corresponding pyproject.toml file.
#
channels:
- conda-forge
dependencies:
- bthing-conda
- conda-forge::cthing
- pip
- pip:
- athing
```
<!-- [[[end]]] -->
### Usage within python
`pyproject2conda` can also be used within python:
```pycon
>>> from pyproject2conda.requirements import ParseDepends
>>> p = ParseDepends.from_path("./tests/data/test-pyproject.toml")
# Basic environment
>>> print(p.to_conda_yaml(python_include="infer").strip())
channels:
- conda-forge
dependencies:
- python>=3.8,<3.11
- bthing-conda
- conda-forge::cthing
- pip
- pip:
- athing
# Environment with extras
>>> print(p.to_conda_yaml(extras="test").strip())
channels:
- conda-forge
dependencies:
- bthing-conda
- conda-forge::cthing
- conda-forge::pytest
- pandas
- pip
- pip:
- athing
```
### Configuration
`pyproject2conda` can be configured with a `[tool.pyproject2conda]` section in
`pyproject.toml`. To specify conda channels use:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(begin="[tool.pyproject2conda]", end=None)]]] -->
```toml
# ...
[tool.pyproject2conda]
channels = ['conda-forge']
# these are the same as the default values of `p2c project`
template_python = "py{py}-{env}"
template = "{env}"
style = "yaml"
# options
python = ["3.10"]
# Note that this is relative to the location of pyproject.toml
user_config = "config/userconfig.toml"
# These environments will be created with the package, package dependencies, and
# dependencies from groups or extras with environment name so the below is the
# same as
#
# [tool.pyproject2conda.envs.test]
# extras_or_groups = "test"
#
default_envs = ["test", "dev", "dist-pypi"]
[tool.pyproject2conda.envs.base]
style = ["requirements"]
# This will have no extras or groups
#
# A value of `extras = true` will would be equivalent to
# passing extras_or_groups = <env-name>
[tool.pyproject2conda.envs."test-extras"]
extras = ["test"]
style = ["yaml", "requirements"]
[[tool.pyproject2conda.overrides]]
envs = ['test-extras', "dist-pypi"]
skip_package = true
[[tool.pyproject2conda.overrides]]
envs = ["test", "test-extras"]
python = ["3.10", "3.11"]
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
Note that specifying channels at the command line overrides
`tool.pyproject2conda.channels`.
You can also specify environments without the package dependences (those under
`project.dependencies`) by passing the `--skip-package` flag. This is useful for
defining environments for build, etc, that do not require the package be
installed. For example:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(begin="dist-pypi = [", end="[tool.pyproject2conda]")]]] -->
```toml
# ...
dist-pypi = [
# this is intended to be parsed with --skip-package option
"setuptools",
"build",
]
[tool.pyproject2conda.dependencies]
athing = { pip = true }
bthing = { skip = true, packages = "bthing-conda" }
cthing = { channel = "conda-forge" }
pytest = { channel = "conda-forge" }
matplotlib = { skip = true, packages = [
"additional-thing; python_version < '3.9'",
"conda-matplotlib"
] }
build = { channel = "pip" }
# ...
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
These can be accessed using either of the following:
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("pyproject2conda yaml -f tests/data/test-pyproject.toml -e dist-pypi --skip-package")]]] -->
```bash
$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e dist-pypi --skip- \
package
channels:
- conda-forge
dependencies:
- setuptools
- pip
- pip:
- build
```
<!-- [[[end]]] -->
or
```pycon
>>> from pyproject2conda.requirements import ParseDepends
>>> p = ParseDepends.from_path("./tests/data/test-pyproject.toml")
# Basic environment
>>> print(p.to_conda_yaml(extras="dist-pypi", skip_package=True).strip())
channels:
- conda-forge
dependencies:
- setuptools
- pip
- pip:
- build
```
### Creating multiple environments from `pyproject.toml`
`pyproject2conda` provides a means to create all needed environment/requirement
files in one go. We configure the environments using the `pyproject.toml` files
in the `[tool.pyproject2conda]` section. For example, example the configuration:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(begin="[tool.pyproject2conda]", end=None)]]] -->
```toml
# ...
[tool.pyproject2conda]
channels = ['conda-forge']
# these are the same as the default values of `p2c project`
template_python = "py{py}-{env}"
template = "{env}"
style = "yaml"
# options
python = ["3.10"]
# Note that this is relative to the location of pyproject.toml
user_config = "config/userconfig.toml"
# These environments will be created with the package, package dependencies, and
# dependencies from groups or extras with environment name so the below is the
# same as
#
# [tool.pyproject2conda.envs.test]
# extras_or_groups = "test"
#
default_envs = ["test", "dev", "dist-pypi"]
[tool.pyproject2conda.envs.base]
style = ["requirements"]
# This will have no extras or groups
#
# A value of `extras = true` will would be equivalent to
# passing extras_or_groups = <env-name>
[tool.pyproject2conda.envs."test-extras"]
extras = ["test"]
style = ["yaml", "requirements"]
[[tool.pyproject2conda.overrides]]
envs = ['test-extras', "dist-pypi"]
skip_package = true
[[tool.pyproject2conda.overrides]]
envs = ["test", "test-extras"]
python = ["3.10", "3.11"]
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
run through the command `pyproject2conda project` (or `p2c project`):
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("p2c project -f tests/data/test-pyproject.toml --dry ", wrapper="bash", bounds=(None, 45))]]] -->
```bash
$ p2c project -f tests/data/test-pyproject.toml --dry
# --------------------
# Creating requirements base.txt
athing
bthing
cthing; python_version < "3.10"
# --------------------
# Creating yaml py310-test-extras.yaml
channels:
- conda-forge
dependencies:
- python=3.10
- conda-forge::pytest
- pandas
# --------------------
# Creating yaml py311-test-extras.yaml
channels:
- conda-forge
dependencies:
- python=3.11
- conda-forge::pytest
- pandas
# --------------------
# Creating requirements test-extras.txt
pandas
pytest
# --------------------
# Creating yaml py310-test.yaml
channels:
- conda-forge
dependencies:
- python=3.10
- bthing-conda
- conda-forge::pytest
- pandas
- pip
- pip:
- athing
# --------------------
# Creating yaml py311-test.yaml
channels:
- conda-forge
dependencies:
- python=3.11
- bthing-conda
- conda-forge::pytest
...
```
<!-- [[[end]]] -->
Note that here, we have used the `--dry` option to just print the output. In
production, you'd omit this flag, and files according to `--template` and
`--template-python` would be used.
The options under `[tool.pyproject2conda]` follow the command line options
(replace `-` with `_`). To specify an environment, you can either use the
`[tool.pyproject.envs."environment-name"]` method, or, if the environment is the
same as an `project.optional-dependencies` or `dependency-grroups`, you can just
specify it under `tool.pyproject2conda.default_envs`:
```toml
[tool.pyproject2conda]
# ...
default_envs = ["test"]
```
is equivalent to
```toml
[tool.pyproject2conda.envs.test]
extras = ["tests"]
```
To specify a conda environment (`yaml`) file, pass `style = "yaml"` (the
default). To specify a requirements file, pass `style = "requirements"`. You can
specify both to make both.
Options in a given `tool.pyproject2conda.envs."environment-name"` section
override those at the `tool.pyproject2conda` level. So, for example:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(begin='[tool.pyproject2conda.envs."test-extras"]', end='[[tool.pyproject2conda.overrides]]', begin_dot=False)]]] -->
```toml
# ...
[tool.pyproject2conda.envs."test-extras"]
extras = ["test"]
style = ["yaml", "requirements"]
# ...
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
will override use the two styles instead of the default of `yaml`.
You can also override options for multiple environments using the
`[[tools.pyproject2conda.overrides]]` list. Just specify the override option(s)
and the environments to apply them to. For example, above we specify that the
base option is `False` for envs `test-extras` and `dist-pypi`, and that the
python version should be `3.10` and `3.11` for envs `test` and `test-extras`.
Note that each "overrides" table must specify the options to be overridden, and
the environments that these overrides apply to. Also, note that subsequenct
overrides override previous overrides/options (last option wins).
So in all, options are picked up, in order, from the overrides list, then the
environment definition, and finally, from the default options.
You can also define "user defined" configurations. This can be done through the
option `--user-config`. This allows you to define your own environments outside
of the (most likely source controlled) `pyproject.toml` file. For example, we
have the option `user_config=config/userconfig.toml`.
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog cat_lines(path="./tests/data/config/userconfig.toml", begin=None, end=None)]]] -->
```toml
[tool.pyproject2conda.envs."user-dev"]
extras_or_groups = ["dev", "dist-pypi"]
deps = ["extra-dep"]
reqs = ["extra-req"]
name = "hello"
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
Note that the full path of this file is note that the path of the `user_conifg`
file is relative to them`pyproject.toml` file. So, if the `pyproject.toml` file
is at `a/path/pyproject.toml`, the path of user configuration files will be
`a/path/config/userconfig.toml`. We then can run the following:
<!-- prettier-ignore-start -->
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog run_command("p2c project -f tests/data/test-pyproject.toml --dry --envs user-dev", wrapper="bash")]]] -->
```bash
$ p2c project -f tests/data/test-pyproject.toml --dry --envs user-dev
# --------------------
# Creating yaml py310-user-dev.yaml
name: hello
channels:
- conda-forge
dependencies:
- python=3.10
- bthing-conda
- conda-forge::pytest
- conda-matplotlib
- extra-dep
- pandas
- setuptools
- pip
- pip:
- athing
- build
- extra-req
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
### CLI options
See
[command line interface documentation](https://pages.nist.gov/pyproject2conda/reference/cli.html#)
for details on the commands and options.
<!-- markdownlint-disable MD013 -->
<!-- prettier-ignore-start -->
<!-- [cog
import os
os.environ["P2C_RICH_CLICK_MAX_WIDTH"] = "90"
run_command("pyproject2conda --help", wrapper="bash")
cmds = [
"list",
"yaml",
"requirements",
"project",
"conda-requirements",
"json"
]
for cmd in cmds:
print(f"#### {cmd}\n")
run_command(f"pyproject2conda {cmd} --help", wrapper="bash")
] -->
<!-- [end] -->
<!-- prettier-ignore-end -->
<!-- markdownlint-enable MD013 -->
## Related work
The application `pyproject2conda` is used in the development of the following
packages:
- [`cmomy`](https://github.com/usnistgov/cmomy)
- [`thermoextrap`](https://github.com/usnistgov/thermoextrap)
- [`tmmc-lnpy`](https://github.com/usnistgov/tmmc-lnpy)
- [`module-utilities`](https://github.com/usnistgov/module-utilities)
- [`analphipy`](https://github.com/conda-forge/analphipy-feedstock)
- `pyproject2conda` itself!
<!-- end-docs -->
## Documentation
See the [documentation][docs-link] for a look at `pyproject2conda` in action.
## License
This is free software. See [LICENSE][license-link].
## Contact
The author can be reached at <wpk@nist.gov>.
## Credits
This package was created using
[Cookiecutter](https://github.com/audreyr/cookiecutter) with the
[usnistgov/cookiecutter-nist-python](https://github.com/usnistgov/cookiecutter-nist-python)
template.
<!-- LocalWords: conda subcommands
-->
<!-- markdownlint-disable MD024 -->
<!-- markdownlint-disable MD013 -->
<!-- prettier-ignore-start -->
# Changelog
Changelog for `pyproject2conda`
## Unreleased
[changelog.d]: https://github.com/usnistgov/pyproject2conda/tree/main/changelog.d
See the fragment files in [changelog.d]
<!-- prettier-ignore-end -->
<!-- markdownlint-enable MD013 -->
<!-- scriv-insert-here -->
## v0.18.0 — 2025-01-24
### Added
- Can now specify current package in dependency-groups like with extras. For
example, with:
```toml
[project]
name = "mypackage"
...
optional-dependencies.opt = [ "opt1" ]
[dependency-groups]
dev = [
"pytest",
"mypackage[opt]"
]
```
Will render optional dependencies from `opt` extra when using group `dev`
- Added flag `--pip-only` to treat all requirements as pip requirements in
`environment.yaml` files. Closes #8
## v0.16.0 — 2024-12-31
### Changed
- Read default version from first found file, in order,
`.python-version-default` and `.python-version`. This allows for "default"
version being different from pinned version specifier, as the latter can be a
range of python values.
## v0.15.0 — 2024-12-17
### Added
- Can now pass requirements for package with `--req/-r "-e ."` for example.
## v0.14.0 — 2024-12-16
### Added
- `--python` flag now accepts options `default`, `all`, `lowest`, and `highest`.
`default` sets python to value found in `.python-version` file in current
directory. Other options extract values entries of form
`"Programming Language :: Python :: 3.10"'`, etc,from
`pyproject.toml:project.classifiers` table.
- `all`: All specified python version
- `lowest`: Lowest python version
- `highest`: Highest python version
- Added `--reqs-ext` and `--yaml-ext` options.
## v0.13.0 — 2024-11-04
### Changed
- Allow `overrides` for all options.
- `overrides` override environment options.
## v0.12.0 — 2024-11-04
### Removed
- Removed comments based (`# p2c: ...`) support. Specify changes with
`tool.pyproject2conda.dependencies` table only. This greatly simplifies the
code, and has become the primary way to use the `pyproject2conda`.
### Added
- Added [PEP 735](https://peps.python.org/pep-0735/) support. This includes
adding option `--group` to the cli, and `groups` key to
`tools.pyproject2conda.envs....` tables. There is also an option
`--extra-or-group` (or `extras_or_groups` in pyproject.toml) that will first
try to find dependencies from "extras" and then from "groups".
### Changed
- Passing no extras to an environment now defaults to no added extras or groups.
Old behavior (to default to the extra with the same name as the environment)
was lead to complications with support of `dependency-groups`. Explicitly pass
the extra or group if to get the old behavior.
- `default_envs` now passed the environment name as `extras_or_groups`.
Therefore, if the name of the environment is an extra, it will be used.
Otherwise, it will be from a group of that name.
- Removed option `--base/--no-base`. Replaced with `--skip-package`. Default is
to include package dependencies. Pass `--skip-package` (or
`skip_package = true` in `pyproject.toml`) to skip package dependencies.
## v0.11.0 — 2023-11-28
### Added
- Can now access "build-system.requires" as an extra. This can be useful for
creating isolated environments to build a package.
### Changed
- Can now specify `pip` as a conda dependency. This is needed for cases that
there are no pip dependencies in the environment, but you want it there for
installing local packages. This may be the case if using `conda-lock` on an
environment. Note that, much like python is always first in the dependency
list, pip is always last.
## v0.10.0 — 2023-11-17
### Added
- Can now specify conda changes using `tool.pyproject2conda.dependencies` table.
This is an alternative to using `# p2c:` comments.
- Refactored code. Split `parser` to `requirements` and `overrides`. Also
cleaned up the parsing logic to hopefully make future changes simpler.
## v0.9.0 — 2023-11-14
### Added
- Default is now to remove whitespace from dependencies. For example, the
dependency `module > 0.1` will become `module>0.1`. To override this
behaviour, pass the option `--no-remove-whitespace`.
- Now supports python version `>3.8,<=3.12`
- Can now specify `extras = false` in pyprojec.toml to skip any extras. The
default (`extras = true`) is the same as `extras = [env_name]` where
`env_name` is the name of the environment (e.g.,
`tool.pyproject2conda.envs.env_name`).
## v0.8.0 — 2023-10-02
### Added
- Added option to either raise error, or print message for environments with no
dependencies.
### Changed
- pyproject2conda now works with `pyproject.toml` files with no dependencies.
## v0.7.0 — 2023-09-26
### Added
- Now use `logging` to print info output.
### Changed
- cli now uses `typer`. Since the program was already typed, this simplifies the
interface.
- Program can now be called with any of `pyproject2conda`, `p2c`, or
`python -m pyproject2conda`.
- Added cli options to web documentation.
- Fixed small typos and typing issues.
- The cli option `--python-include` now requires an argument. This is due to
`typer` not liking options with zero or one arguments. Instead of the bare
flag `--python-include` including the python spec from `pyproject.toml`, you
have to pass `--python-include infer` to get that behavior.
- Added extra `all` to pip install options. The default is to not include `rich`
or `shellingham`. Using `pip install pyproject2conda[all]` includes these
optional packages. Note that the conda-forge recipe is based on the plain
install (i.e., no `rich` or `shellingham`). However, the conda-froge recipe
for `typer` does include these. That means, if you want to install
`pyproject2conda` without the optional extras, you'll have to use pip.
## v0.6.1 — 2023-09-22
### Changed
- Fixed edge case where `--overwrite=check` and have a `user_config`. Now when
using `p2c project` with a `user_config` and `overwrite=check`, the timestamp
of the output file will be compared to both the `filename=pyproject.toml` and
`user_config`.
## v0.6.0 — 2023-09-19
### Added
- Added `project` subcommand. This uses a configuration in `pyproject.toml` to
build multiple enivonments in one go.
- Added `--deps` and `--reqs` flags to include extra conda and pip requirements.
- Added `--overwrite` to check if output file exists.
- Now (correctly) using rich_click.
- Added tests for all new cases, and some edge cases.
## v0.5.1 — 2023-09-09
### Added
- Added `--sort/--no-sort` flag to cli. Default is to sort dependencies. This
fixes issues with changing order in `pyproject.toml` leading to different yaml
files.
### Changed
- Changed structure of the repo to better support some third party tools.
- Moved nox environments from `.nox` to `.nox/{project-name}/envs`. This fixes
issues with ipykernel giving odd names for locally installed environments.
- Moved repo specific dot files to the `config` directory (e.g.,
`.noxconfig.toml` to `config/userconfig.toml`). This cleans up the top level
of the repo.
- added some support for using `nbqa` to run mypy/pyright on notebooks.
- Added ability to bootstrap development environment using pipx. This should
simplify initial setup. See Contributing for more info.
- Main repo now on usnistgov.
This software was developed by employees of the National Institute of Standards
and Technology (NIST), an agency of the Federal Government. Pursuant to title 17
United States Code Section 105, works of NIST employees are not subject to
copyright protection in the United States and are considered to be in the public
domain. Permission to freely use, copy, modify, and distribute this software and
its documentation without fee is hereby granted, provided that this notice and
disclaimer of warranty appears in all copies.
THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
Distributions of NIST software should also include copyright and licensing
statements of any third-party software that are legally bundled with the code in
compliance with the conditions of those licenses.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyproject2conda",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.8",
"maintainer_email": null,
"keywords": "pyproject2conda",
"author": null,
"author_email": "\"William P. Krekelberg\" <wpk@nist.gov>",
"download_url": "https://files.pythonhosted.org/packages/8d/53/5754bbc9830e21114f777a48ef28d73c49ebf357f42562038f104588ac77/pyproject2conda-0.18.0.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD041 -->\n\n[![Repo][repo-badge]][repo-link] [![Docs][docs-badge]][docs-link]\n[![PyPI license][license-badge]][license-link]\n[![PyPI version][pypi-badge]][pypi-link]\n[![Conda (channel only)][conda-badge]][conda-link]\n[![Code style: black][black-badge]][black-link]\n\n<!--\n For more badges, see\n https://shields.io/category/other\n https://naereen.github.io/badges/\n [pypi-badge]: https://badge.fury.io/py/pyproject2conda\n-->\n\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black-link]: https://github.com/psf/black\n[pypi-badge]: https://img.shields.io/pypi/v/pyproject2conda\n[pypi-link]: https://pypi.org/project/pyproject2conda\n[docs-badge]: https://img.shields.io/badge/docs-sphinx-informational\n[docs-link]: https://pages.nist.gov/pyproject2conda/\n[repo-badge]: https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff\n[repo-link]: https://github.com/usnistgov/pyproject2conda\n[conda-badge]: https://img.shields.io/conda/v/conda-forge/pyproject2conda\n[conda-link]: https://anaconda.org/conda-forge/pyproject2conda\n[license-badge]: https://img.shields.io/pypi/l/cmomy?color=informational\n[license-link]: https://github.com/usnistgov/pyproject2conda/blob/main/LICENSE\n\n<!-- other links -->\n\n[poetry2conda]: https://github.com/dojeda/poetry2conda\n\n# `pyproject2conda`\n\nA script to convert `pyproject.toml` dependencies to `environment.yaml` files.\n\n## Overview\n\nThe main goal of `pyproject2conda` is to provide a means to keep all basic\ndependency information, for both `pip` based and `conda` based environments, in\n`pyproject.toml`. I often use a mix of pip and conda when developing packages,\nand in my everyday workflow. Some packages just aren't available on both. If you\nuse poetry, I'd highly recommend [poetry2conda].\n\n## Features\n\n- Simple comment based syntax to add information to dependencies when creating\n `environment.yaml`\n\n## Status\n\nThis package is actively used by the author, but is still very much a work in\nprogress. Please feel free to create a pull request for wanted features and\nsuggestions!\n\n## Quick start\n\n<!-- start-installation -->\n\nUse one of the following to install `pyproject2conda`:\n\n<!-- markdownlint-disable MD014 -->\n\n```bash\n$ pip/pipx/uvx install pyproject2conda\n```\n\nor\n\n```bash\n$ conda/condax install -c conda-forge pyproject2conda\n```\n\n[rich]: https://github.com/Textualize/rich\n[shellingham]: https://github.com/sarugaku/shellingham\n[typer]: https://github.com/tiangolo/typer\n\nIf using pip, to install with [rich] and [shellingham] support, either install\nthem your self, or use:\n\n```bash\n$ pip/pipx/uvx install pyproject2conda[all]\n```\n\n<!-- markdownlint-enable MD014 -->\n\nThe conda-forge distribution of [typer] (which `pyproject2conda` uses) installs\n[rich] and [shellingham] by default.\n\n<!-- end-installation -->\n\n## Example usage\n\n### Basic usage\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog\nimport sys\n\nsys.path.insert(0, \".\")\nfrom tools.cog_utils import wrap_command, get_pyproject, run_command, cat_lines\nsys.path.pop(0)\n]]] -->\n<!-- [[[end]]] -->\n\nConsider the `toml` file\n[test-pyproject.toml](https://github.com/usnistgov/pyproject2conda/blob/main/tests/data/test-pyproject.toml).\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(begin=None, end=\"[tool.pyproject2conda]\", begin_dot=False)]]] -->\n\n```toml\n[project]\nname = \"hello\"\nrequires-python = \">=3.8,<3.11\"\ndependencies = [\n\"athing\", #\n\"bthing\",\n\"cthing; python_version < '3.10'\",\n]\n\n[project.optional-dependencies]\ntest = [\n\"pandas\", #\n\"pytest\",\n]\ndev-extras = [\"matplotlib\"]\ndev = [\"hello[test]\", \"hello[dev-extras]\"]\ndist-pypi = [\n# this is intended to be parsed with --skip-package option\n\"setuptools\",\n\"build\",\n]\n\n[tool.pyproject2conda.dependencies]\nathing = { pip = true }\nbthing = { skip = true, packages = \"bthing-conda\" }\ncthing = { channel = \"conda-forge\" }\npytest = { channel = \"conda-forge\" }\nmatplotlib = { skip = true, packages = [\n\"additional-thing; python_version < '3.9'\",\n\"conda-matplotlib\"\n] }\nbuild = { channel = \"pip\" }\n\n# ...\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nNote the table `[tool.pyproject2conda.dependencies]`. This table takes as keys\nthe dependency names from `project.dependencies` or\n`project.optional-dependencies`, and as values a mapping with keys:\n\n- `pip`: if `true`, specify install via pip in `environment.yaml` file\n- `skip`: if `true`, skip the dependency\n- `channel`: conda-channel to use for this dependency\n- `packages`: Additional packages to include in `environment.yaml` file\n\nSo, if we run the following, we get:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - conda-forge::cthing\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nBy default, the python version is not included in the resulting conda output. To\ninclude the specification from `pyproject.toml`, use `--python-include infer`\noption:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include infer\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include infer\nchannels:\n - conda-forge\ndependencies:\n - python>=3.8,<3.11\n - bthing-conda\n - conda-forge::cthing\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\n### Specify python version\n\nTo specify a specific value of python in the output, pass a value with:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include python=3.9\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-include \\\n python=3.9\nchannels:\n - conda-forge\ndependencies:\n - python=3.9\n - bthing-conda\n - conda-forge::cthing\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nNote that this is for including python in the resulting environment file.\n\nYou can also constrain packages by the python version using the standard\n`pyproject.toml` syntax `\"...; python_version < 'some-version-number'\"`. For is\nparsed for both the pip packages and conda packages:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nIt is common to want to specify the python version and include it in the\nresulting environment file. You could, for example use:\n\n<!-- markdownlint-disable MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10 --python-include python=3.10\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python-version 3.10 \\\n --python-include python=3.10\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - bthing-conda\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n<!-- markdownlint-enable MD013 -->\n\nBecause this is common, you can also just pass the option `-p/--python`:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --python 3.10\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --python 3.10\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - bthing-conda\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nPassing `--python=\"default\"` will extract the python version from\n`.python-version` file. Passign `--python` value `\"lowest\"` or `\"highest\"` will\nextract the lowest or highest python version, respectively, from the\n`project.classifiers` table of the `pyproject.toml` file.\n\n### Adding extra conda dependencies and pip requirements\n\nYou can also add additional conda and pip dependencies with the flags\n`-d/--deps` and `-r/--reqs`, respectively. Adding the last example:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml -d dep -r req\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml -d dep -r req\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - conda-forge::cthing\n - dep\n - pip\n - pip:\n - athing\n - req\n```\n\n<!-- [[[end]]] -->\n\nThese will also obey dependencies like `dep:python_version<={version}`. Pass the\nflags multiple times to pass multiple dependencies.\n\n### Command \"aliases\"\n\nThe name `pyproject2conda` can be a bit long to type. For this reason, the\npackage also ships with the alias `p2c`, which has the exact same functionality.\nAdditionally, the subcommands can be shortened to a unique match:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"p2c y -f tests/data/test-pyproject.toml --python 3.10\")]]] -->\n\n```bash\n$ p2c y -f tests/data/test-pyproject.toml --python 3.10\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - bthing-conda\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nYou can also call with `python -m pyproject2conda`.\n\n### Installing extras\n\nGiven the extra dependency:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable MD013 -->\n<!-- [[[cog cat_lines(begin=\"[project.optional-dependencies]\", end=\"[tool.pyproject2conda.dependencies]\")]]] -->\n\n```toml\n# ...\n[project.optional-dependencies]\ntest = [\n\"pandas\", #\n\"pytest\",\n]\ndev-extras = [\"matplotlib\"]\ndev = [\"hello[test]\", \"hello[dev-extras]\"]\ndist-pypi = [\n# this is intended to be parsed with --skip-package option\n\"setuptools\",\n\"build\",\n]\n\n# ...\n```\n\n<!-- [[[end]]] -->\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\nand running the following gives:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml -e test\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e test\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - conda-forge::cthing\n - conda-forge::pytest\n - pandas\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\n`pyproject2conda` also works with self referenced dependencies:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml -e dev\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e dev\nchannels:\n - conda-forge\ndependencies:\n - additional-thing\n - bthing-conda\n - conda-forge::cthing\n - conda-forge::pytest\n - conda-matplotlib\n - pandas\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\n### Installing from `dependency-groups`\n\n`pyproject2conda` also support the [PEP 735](https://peps.python.org/pep-0735/)\n`dependency-groups` table. For example, if we have the follinging\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable MD013 -->\n<!-- [[[cog cat_lines(begin=\"[dependency-groups]\", end=\"[tool.pyproject2conda.dependencies]\", path=\"tests/data/test-pyproject-groups.toml\")]]] -->\n\n```toml\n# ...\n[dependency-groups]\ntest = [\"pandas\", \"pytest\"]\ndev-extras = [\"matplotlib\"]\ndev = [{ include-group = \"test\" }, { include-group = \"dev-extras\" }]\ndist-pypi = [\n# this is intended to be parsed with --skip-package option\n\"setuptools\",\n\"build\",\n]\noptional-opt1 = [ \"hello[opt1]\" ]\noptional-opt2 = [ \"hello[opt2]\" ]\noptional-all = [ \"hello[all]\" ]\n\n# ...\n```\n\n<!-- [[[end]]] -->\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\nThen, we can build a requirement file, specifying groups with `-g/--group` flag.\n\n<!-- markdownlint-disable-next-line MD013 -->\n <!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject-groups.toml --group dev\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject-groups.toml --group dev\nchannels:\n - conda-forge\ndependencies:\n - additional-thing\n - bthing-conda\n - conda-forge::cthing\n - conda-forge::pytest\n - conda-matplotlib\n - pandas\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\nThe advantage of using `dependency-groups` as opposed to\n`package.optional-dependencies` is that they work for non-package projects, and\nare not included in the metadata of distributed packages.\n\n### Header in output\n\nBy default, `pyproject2conda` includes a header in most output files to note\nthat the files are auto generated. No header is included by default when writing\nto standard output. To override this behavior, pass `--header/--noheader`:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml --header\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml --header\n#\n# This file is autogenerated by pyproject2conda\n# with the following command:\n#\n# $ pyproject2conda yaml -f tests/data/test-pyproject.toml --header\n#\n# You should not manually edit this file.\n# Instead edit the corresponding pyproject.toml file.\n#\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - conda-forge::cthing\n - pip\n - pip:\n - athing\n```\n\n<!-- [[[end]]] -->\n\n### Usage within python\n\n`pyproject2conda` can also be used within python:\n\n```pycon\n>>> from pyproject2conda.requirements import ParseDepends\n>>> p = ParseDepends.from_path(\"./tests/data/test-pyproject.toml\")\n\n# Basic environment\n>>> print(p.to_conda_yaml(python_include=\"infer\").strip())\nchannels:\n - conda-forge\ndependencies:\n - python>=3.8,<3.11\n - bthing-conda\n - conda-forge::cthing\n - pip\n - pip:\n - athing\n\n# Environment with extras\n>>> print(p.to_conda_yaml(extras=\"test\").strip())\nchannels:\n - conda-forge\ndependencies:\n - bthing-conda\n - conda-forge::cthing\n - conda-forge::pytest\n - pandas\n - pip\n - pip:\n - athing\n\n```\n\n### Configuration\n\n`pyproject2conda` can be configured with a `[tool.pyproject2conda]` section in\n`pyproject.toml`. To specify conda channels use:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(begin=\"[tool.pyproject2conda]\", end=None)]]] -->\n\n```toml\n# ...\n[tool.pyproject2conda]\nchannels = ['conda-forge']\n# these are the same as the default values of `p2c project`\ntemplate_python = \"py{py}-{env}\"\ntemplate = \"{env}\"\nstyle = \"yaml\"\n# options\npython = [\"3.10\"]\n# Note that this is relative to the location of pyproject.toml\nuser_config = \"config/userconfig.toml\"\n# These environments will be created with the package, package dependencies, and\n# dependencies from groups or extras with environment name so the below is the\n# same as\n#\n# [tool.pyproject2conda.envs.test]\n# extras_or_groups = \"test\"\n#\ndefault_envs = [\"test\", \"dev\", \"dist-pypi\"]\n\n[tool.pyproject2conda.envs.base]\nstyle = [\"requirements\"]\n\n# This will have no extras or groups\n#\n# A value of `extras = true` will would be equivalent to\n# passing extras_or_groups = <env-name>\n[tool.pyproject2conda.envs.\"test-extras\"]\nextras = [\"test\"]\nstyle = [\"yaml\", \"requirements\"]\n\n[[tool.pyproject2conda.overrides]]\nenvs = ['test-extras', \"dist-pypi\"]\nskip_package = true\n\n[[tool.pyproject2conda.overrides]]\nenvs = [\"test\", \"test-extras\"]\npython = [\"3.10\", \"3.11\"]\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nNote that specifying channels at the command line overrides\n`tool.pyproject2conda.channels`.\n\nYou can also specify environments without the package dependences (those under\n`project.dependencies`) by passing the `--skip-package` flag. This is useful for\ndefining environments for build, etc, that do not require the package be\ninstalled. For example:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(begin=\"dist-pypi = [\", end=\"[tool.pyproject2conda]\")]]] -->\n\n```toml\n# ...\ndist-pypi = [\n# this is intended to be parsed with --skip-package option\n\"setuptools\",\n\"build\",\n]\n\n[tool.pyproject2conda.dependencies]\nathing = { pip = true }\nbthing = { skip = true, packages = \"bthing-conda\" }\ncthing = { channel = \"conda-forge\" }\npytest = { channel = \"conda-forge\" }\nmatplotlib = { skip = true, packages = [\n\"additional-thing; python_version < '3.9'\",\n\"conda-matplotlib\"\n] }\nbuild = { channel = \"pip\" }\n\n# ...\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nThese can be accessed using either of the following:\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"pyproject2conda yaml -f tests/data/test-pyproject.toml -e dist-pypi --skip-package\")]]] -->\n\n```bash\n$ pyproject2conda yaml -f tests/data/test-pyproject.toml -e dist-pypi --skip- \\\n package\nchannels:\n - conda-forge\ndependencies:\n - setuptools\n - pip\n - pip:\n - build\n```\n\n<!-- [[[end]]] -->\n\nor\n\n```pycon\n>>> from pyproject2conda.requirements import ParseDepends\n>>> p = ParseDepends.from_path(\"./tests/data/test-pyproject.toml\")\n\n# Basic environment\n>>> print(p.to_conda_yaml(extras=\"dist-pypi\", skip_package=True).strip())\nchannels:\n - conda-forge\ndependencies:\n - setuptools\n - pip\n - pip:\n - build\n\n```\n\n### Creating multiple environments from `pyproject.toml`\n\n`pyproject2conda` provides a means to create all needed environment/requirement\nfiles in one go. We configure the environments using the `pyproject.toml` files\nin the `[tool.pyproject2conda]` section. For example, example the configuration:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(begin=\"[tool.pyproject2conda]\", end=None)]]] -->\n\n```toml\n# ...\n[tool.pyproject2conda]\nchannels = ['conda-forge']\n# these are the same as the default values of `p2c project`\ntemplate_python = \"py{py}-{env}\"\ntemplate = \"{env}\"\nstyle = \"yaml\"\n# options\npython = [\"3.10\"]\n# Note that this is relative to the location of pyproject.toml\nuser_config = \"config/userconfig.toml\"\n# These environments will be created with the package, package dependencies, and\n# dependencies from groups or extras with environment name so the below is the\n# same as\n#\n# [tool.pyproject2conda.envs.test]\n# extras_or_groups = \"test\"\n#\ndefault_envs = [\"test\", \"dev\", \"dist-pypi\"]\n\n[tool.pyproject2conda.envs.base]\nstyle = [\"requirements\"]\n\n# This will have no extras or groups\n#\n# A value of `extras = true` will would be equivalent to\n# passing extras_or_groups = <env-name>\n[tool.pyproject2conda.envs.\"test-extras\"]\nextras = [\"test\"]\nstyle = [\"yaml\", \"requirements\"]\n\n[[tool.pyproject2conda.overrides]]\nenvs = ['test-extras', \"dist-pypi\"]\nskip_package = true\n\n[[tool.pyproject2conda.overrides]]\nenvs = [\"test\", \"test-extras\"]\npython = [\"3.10\", \"3.11\"]\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nrun through the command `pyproject2conda project` (or `p2c project`):\n\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"p2c project -f tests/data/test-pyproject.toml --dry \", wrapper=\"bash\", bounds=(None, 45))]]] -->\n\n```bash\n$ p2c project -f tests/data/test-pyproject.toml --dry\n# --------------------\n# Creating requirements base.txt\nathing\nbthing\ncthing; python_version < \"3.10\"\n# --------------------\n# Creating yaml py310-test-extras.yaml\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - conda-forge::pytest\n - pandas\n# --------------------\n# Creating yaml py311-test-extras.yaml\nchannels:\n - conda-forge\ndependencies:\n - python=3.11\n - conda-forge::pytest\n - pandas\n# --------------------\n# Creating requirements test-extras.txt\npandas\npytest\n# --------------------\n# Creating yaml py310-test.yaml\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - bthing-conda\n - conda-forge::pytest\n - pandas\n - pip\n - pip:\n - athing\n# --------------------\n# Creating yaml py311-test.yaml\nchannels:\n - conda-forge\ndependencies:\n - python=3.11\n - bthing-conda\n - conda-forge::pytest\n\n ...\n```\n\n<!-- [[[end]]] -->\n\nNote that here, we have used the `--dry` option to just print the output. In\nproduction, you'd omit this flag, and files according to `--template` and\n`--template-python` would be used.\n\nThe options under `[tool.pyproject2conda]` follow the command line options\n(replace `-` with `_`). To specify an environment, you can either use the\n`[tool.pyproject.envs.\"environment-name\"]` method, or, if the environment is the\nsame as an `project.optional-dependencies` or `dependency-grroups`, you can just\nspecify it under `tool.pyproject2conda.default_envs`:\n\n```toml\n[tool.pyproject2conda]\n# ...\ndefault_envs = [\"test\"]\n\n```\n\nis equivalent to\n\n```toml\n[tool.pyproject2conda.envs.test]\nextras = [\"tests\"]\n\n```\n\nTo specify a conda environment (`yaml`) file, pass `style = \"yaml\"` (the\ndefault). To specify a requirements file, pass `style = \"requirements\"`. You can\nspecify both to make both.\n\nOptions in a given `tool.pyproject2conda.envs.\"environment-name\"` section\noverride those at the `tool.pyproject2conda` level. So, for example:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(begin='[tool.pyproject2conda.envs.\"test-extras\"]', end='[[tool.pyproject2conda.overrides]]', begin_dot=False)]]] -->\n\n```toml\n# ...\n[tool.pyproject2conda.envs.\"test-extras\"]\nextras = [\"test\"]\nstyle = [\"yaml\", \"requirements\"]\n\n# ...\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nwill override use the two styles instead of the default of `yaml`.\n\nYou can also override options for multiple environments using the\n`[[tools.pyproject2conda.overrides]]` list. Just specify the override option(s)\nand the environments to apply them to. For example, above we specify that the\nbase option is `False` for envs `test-extras` and `dist-pypi`, and that the\npython version should be `3.10` and `3.11` for envs `test` and `test-extras`.\nNote that each \"overrides\" table must specify the options to be overridden, and\nthe environments that these overrides apply to. Also, note that subsequenct\noverrides override previous overrides/options (last option wins).\n\nSo in all, options are picked up, in order, from the overrides list, then the\nenvironment definition, and finally, from the default options.\n\nYou can also define \"user defined\" configurations. This can be done through the\noption `--user-config`. This allows you to define your own environments outside\nof the (most likely source controlled) `pyproject.toml` file. For example, we\nhave the option `user_config=config/userconfig.toml`.\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog cat_lines(path=\"./tests/data/config/userconfig.toml\", begin=None, end=None)]]] -->\n\n```toml\n[tool.pyproject2conda.envs.\"user-dev\"]\nextras_or_groups = [\"dev\", \"dist-pypi\"]\ndeps = [\"extra-dep\"]\nreqs = [\"extra-req\"]\nname = \"hello\"\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\nNote that the full path of this file is note that the path of the `user_conifg`\nfile is relative to them`pyproject.toml` file. So, if the `pyproject.toml` file\nis at `a/path/pyproject.toml`, the path of user configuration files will be\n`a/path/config/userconfig.toml`. We then can run the following:\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable-next-line MD013 -->\n<!-- [[[cog run_command(\"p2c project -f tests/data/test-pyproject.toml --dry --envs user-dev\", wrapper=\"bash\")]]] -->\n```bash\n$ p2c project -f tests/data/test-pyproject.toml --dry --envs user-dev\n# --------------------\n# Creating yaml py310-user-dev.yaml\nname: hello\nchannels:\n - conda-forge\ndependencies:\n - python=3.10\n - bthing-conda\n - conda-forge::pytest\n - conda-matplotlib\n - extra-dep\n - pandas\n - setuptools\n - pip\n - pip:\n - athing\n - build\n - extra-req\n```\n\n<!-- [[[end]]] -->\n<!-- prettier-ignore-end -->\n\n### CLI options\n\nSee\n[command line interface documentation](https://pages.nist.gov/pyproject2conda/reference/cli.html#)\nfor details on the commands and options.\n\n<!-- markdownlint-disable MD013 -->\n<!-- prettier-ignore-start -->\n<!-- [cog\n import os\n os.environ[\"P2C_RICH_CLICK_MAX_WIDTH\"] = \"90\"\n\n run_command(\"pyproject2conda --help\", wrapper=\"bash\")\n\n cmds = [\n \"list\",\n \"yaml\",\n \"requirements\",\n \"project\",\n \"conda-requirements\",\n \"json\"\n ]\n\n for cmd in cmds:\n print(f\"#### {cmd}\\n\")\n run_command(f\"pyproject2conda {cmd} --help\", wrapper=\"bash\")\n\n] -->\n\n<!-- [end] -->\n<!-- prettier-ignore-end -->\n\n<!-- markdownlint-enable MD013 -->\n\n## Related work\n\nThe application `pyproject2conda` is used in the development of the following\npackages:\n\n- [`cmomy`](https://github.com/usnistgov/cmomy)\n- [`thermoextrap`](https://github.com/usnistgov/thermoextrap)\n- [`tmmc-lnpy`](https://github.com/usnistgov/tmmc-lnpy)\n- [`module-utilities`](https://github.com/usnistgov/module-utilities)\n- [`analphipy`](https://github.com/conda-forge/analphipy-feedstock)\n- `pyproject2conda` itself!\n\n<!-- end-docs -->\n\n## Documentation\n\nSee the [documentation][docs-link] for a look at `pyproject2conda` in action.\n\n## License\n\nThis is free software. See [LICENSE][license-link].\n\n## Contact\n\nThe author can be reached at <wpk@nist.gov>.\n\n## Credits\n\nThis package was created using\n[Cookiecutter](https://github.com/audreyr/cookiecutter) with the\n[usnistgov/cookiecutter-nist-python](https://github.com/usnistgov/cookiecutter-nist-python)\ntemplate.\n\n<!-- LocalWords: conda subcommands\n -->\n<!-- markdownlint-disable MD024 -->\n<!-- markdownlint-disable MD013 -->\n<!-- prettier-ignore-start -->\n\n# Changelog\n\nChangelog for `pyproject2conda`\n\n## Unreleased\n\n[changelog.d]: https://github.com/usnistgov/pyproject2conda/tree/main/changelog.d\n\nSee the fragment files in [changelog.d]\n\n<!-- prettier-ignore-end -->\n\n<!-- markdownlint-enable MD013 -->\n\n<!-- scriv-insert-here -->\n\n## v0.18.0 \u2014 2025-01-24\n\n### Added\n\n- Can now specify current package in dependency-groups like with extras. For\n example, with:\n\n```toml\n[project]\nname = \"mypackage\"\n...\n\noptional-dependencies.opt = [ \"opt1\" ]\n\n[dependency-groups]\ndev = [\n \"pytest\",\n \"mypackage[opt]\"\n]\n```\n\nWill render optional dependencies from `opt` extra when using group `dev`\n\n- Added flag `--pip-only` to treat all requirements as pip requirements in\n `environment.yaml` files. Closes #8\n\n## v0.16.0 \u2014 2024-12-31\n\n### Changed\n\n- Read default version from first found file, in order,\n `.python-version-default` and `.python-version`. This allows for \"default\"\n version being different from pinned version specifier, as the latter can be a\n range of python values.\n\n## v0.15.0 \u2014 2024-12-17\n\n### Added\n\n- Can now pass requirements for package with `--req/-r \"-e .\"` for example.\n\n## v0.14.0 \u2014 2024-12-16\n\n### Added\n\n- `--python` flag now accepts options `default`, `all`, `lowest`, and `highest`.\n `default` sets python to value found in `.python-version` file in current\n directory. Other options extract values entries of form\n `\"Programming Language :: Python :: 3.10\"'`, etc,from\n `pyproject.toml:project.classifiers` table.\n\n - `all`: All specified python version\n - `lowest`: Lowest python version\n - `highest`: Highest python version\n\n- Added `--reqs-ext` and `--yaml-ext` options.\n\n## v0.13.0 \u2014 2024-11-04\n\n### Changed\n\n- Allow `overrides` for all options.\n- `overrides` override environment options.\n\n## v0.12.0 \u2014 2024-11-04\n\n### Removed\n\n- Removed comments based (`# p2c: ...`) support. Specify changes with\n `tool.pyproject2conda.dependencies` table only. This greatly simplifies the\n code, and has become the primary way to use the `pyproject2conda`.\n\n### Added\n\n- Added [PEP 735](https://peps.python.org/pep-0735/) support. This includes\n adding option `--group` to the cli, and `groups` key to\n `tools.pyproject2conda.envs....` tables. There is also an option\n `--extra-or-group` (or `extras_or_groups` in pyproject.toml) that will first\n try to find dependencies from \"extras\" and then from \"groups\".\n\n### Changed\n\n- Passing no extras to an environment now defaults to no added extras or groups.\n Old behavior (to default to the extra with the same name as the environment)\n was lead to complications with support of `dependency-groups`. Explicitly pass\n the extra or group if to get the old behavior.\n- `default_envs` now passed the environment name as `extras_or_groups`.\n Therefore, if the name of the environment is an extra, it will be used.\n Otherwise, it will be from a group of that name.\n\n- Removed option `--base/--no-base`. Replaced with `--skip-package`. Default is\n to include package dependencies. Pass `--skip-package` (or\n `skip_package = true` in `pyproject.toml`) to skip package dependencies.\n\n## v0.11.0 \u2014 2023-11-28\n\n### Added\n\n- Can now access \"build-system.requires\" as an extra. This can be useful for\n creating isolated environments to build a package.\n\n### Changed\n\n- Can now specify `pip` as a conda dependency. This is needed for cases that\n there are no pip dependencies in the environment, but you want it there for\n installing local packages. This may be the case if using `conda-lock` on an\n environment. Note that, much like python is always first in the dependency\n list, pip is always last.\n\n## v0.10.0 \u2014 2023-11-17\n\n### Added\n\n- Can now specify conda changes using `tool.pyproject2conda.dependencies` table.\n This is an alternative to using `# p2c:` comments.\n- Refactored code. Split `parser` to `requirements` and `overrides`. Also\n cleaned up the parsing logic to hopefully make future changes simpler.\n\n## v0.9.0 \u2014 2023-11-14\n\n### Added\n\n- Default is now to remove whitespace from dependencies. For example, the\n dependency `module > 0.1` will become `module>0.1`. To override this\n behaviour, pass the option `--no-remove-whitespace`.\n- Now supports python version `>3.8,<=3.12`\n- Can now specify `extras = false` in pyprojec.toml to skip any extras. The\n default (`extras = true`) is the same as `extras = [env_name]` where\n `env_name` is the name of the environment (e.g.,\n `tool.pyproject2conda.envs.env_name`).\n\n## v0.8.0 \u2014 2023-10-02\n\n### Added\n\n- Added option to either raise error, or print message for environments with no\n dependencies.\n\n### Changed\n\n- pyproject2conda now works with `pyproject.toml` files with no dependencies.\n\n## v0.7.0 \u2014 2023-09-26\n\n### Added\n\n- Now use `logging` to print info output.\n\n### Changed\n\n- cli now uses `typer`. Since the program was already typed, this simplifies the\n interface.\n- Program can now be called with any of `pyproject2conda`, `p2c`, or\n `python -m pyproject2conda`.\n- Added cli options to web documentation.\n- Fixed small typos and typing issues.\n- The cli option `--python-include` now requires an argument. This is due to\n `typer` not liking options with zero or one arguments. Instead of the bare\n flag `--python-include` including the python spec from `pyproject.toml`, you\n have to pass `--python-include infer` to get that behavior.\n- Added extra `all` to pip install options. The default is to not include `rich`\n or `shellingham`. Using `pip install pyproject2conda[all]` includes these\n optional packages. Note that the conda-forge recipe is based on the plain\n install (i.e., no `rich` or `shellingham`). However, the conda-froge recipe\n for `typer` does include these. That means, if you want to install\n `pyproject2conda` without the optional extras, you'll have to use pip.\n\n## v0.6.1 \u2014 2023-09-22\n\n### Changed\n\n- Fixed edge case where `--overwrite=check` and have a `user_config`. Now when\n using `p2c project` with a `user_config` and `overwrite=check`, the timestamp\n of the output file will be compared to both the `filename=pyproject.toml` and\n `user_config`.\n\n## v0.6.0 \u2014 2023-09-19\n\n### Added\n\n- Added `project` subcommand. This uses a configuration in `pyproject.toml` to\n build multiple enivonments in one go.\n- Added `--deps` and `--reqs` flags to include extra conda and pip requirements.\n- Added `--overwrite` to check if output file exists.\n- Now (correctly) using rich_click.\n- Added tests for all new cases, and some edge cases.\n\n## v0.5.1 \u2014 2023-09-09\n\n### Added\n\n- Added `--sort/--no-sort` flag to cli. Default is to sort dependencies. This\n fixes issues with changing order in `pyproject.toml` leading to different yaml\n files.\n\n### Changed\n\n- Changed structure of the repo to better support some third party tools.\n- Moved nox environments from `.nox` to `.nox/{project-name}/envs`. This fixes\n issues with ipykernel giving odd names for locally installed environments.\n- Moved repo specific dot files to the `config` directory (e.g.,\n `.noxconfig.toml` to `config/userconfig.toml`). This cleans up the top level\n of the repo.\n- added some support for using `nbqa` to run mypy/pyright on notebooks.\n- Added ability to bootstrap development environment using pipx. This should\n simplify initial setup. See Contributing for more info.\n\n- Main repo now on usnistgov.\nThis software was developed by employees of the National Institute of Standards\nand Technology (NIST), an agency of the Federal Government. Pursuant to title 17\nUnited States Code Section 105, works of NIST employees are not subject to\ncopyright protection in the United States and are considered to be in the public\ndomain. Permission to freely use, copy, modify, and distribute this software and\nits documentation without fee is hereby granted, provided that this notice and\ndisclaimer of warranty appears in all copies.\n\nTHE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER\nEXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY\nTHAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM\nINFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE\nSOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT\nSHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,\nINDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR\nIN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,\nCONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR\nPROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT\nOF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.\n\nDistributions of NIST software should also include copyright and licensing\nstatements of any third-party software that are legally bundled with the code in\ncompliance with the conditions of those licenses.\n",
"bugtrack_url": null,
"license": "NIST-PD",
"summary": "A script to convert a Python project declared on a pyproject.toml to a conda environment.",
"version": "0.18.0",
"project_urls": {
"Documentation": "https://pages.nist.gov/pyproject2conda/",
"Homepage": "https://github.com/usnistgov/pyproject2conda"
},
"split_keywords": [
"pyproject2conda"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "97de6331a1501f2f601f07c3b810dd4670943c794bb8e8213247aabe62776ddf",
"md5": "09ef68074053a64cead2c93e5a757089",
"sha256": "f969e5b4d07b96bd419f329aa24fe601061a625f62f3622b2dcbca1138b9c4af"
},
"downloads": -1,
"filename": "pyproject2conda-0.18.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "09ef68074053a64cead2c93e5a757089",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.8",
"size": 36208,
"upload_time": "2025-01-24T17:40:00",
"upload_time_iso_8601": "2025-01-24T17:40:00.412208Z",
"url": "https://files.pythonhosted.org/packages/97/de/6331a1501f2f601f07c3b810dd4670943c794bb8e8213247aabe62776ddf/pyproject2conda-0.18.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8d535754bbc9830e21114f777a48ef28d73c49ebf357f42562038f104588ac77",
"md5": "6d17f4204f174253f8149d2c53906807",
"sha256": "32bc0d806ad4046a9c7b331ba3840a249641a7165e61b0291a6000e129eb9823"
},
"downloads": -1,
"filename": "pyproject2conda-0.18.0.tar.gz",
"has_sig": false,
"md5_digest": "6d17f4204f174253f8149d2c53906807",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.8",
"size": 260569,
"upload_time": "2025-01-24T17:40:02",
"upload_time_iso_8601": "2025-01-24T17:40:02.408650Z",
"url": "https://files.pythonhosted.org/packages/8d/53/5754bbc9830e21114f777a48ef28d73c49ebf357f42562038f104588ac77/pyproject2conda-0.18.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-24 17:40:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "usnistgov",
"github_project": "pyproject2conda",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyproject2conda"
}