Skip to content

Commit

Permalink
Merge pull request #39 from mxstack/drop-pre
Browse files Browse the repository at this point in the history
Remove --pre on generated sources
  • Loading branch information
jensens authored Feb 28, 2024
2 parents 4051dec + 93fbe63 commit 8427d8a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pypa/build
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0
build:
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
17 changes: 16 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
## Changes

### 4.0.0 (2024-02-28)

- Breaking: Remove `--pre` on sources from generated `requirements-mxdev.txt`.
Usually it is not needed any longer, at least withy pip 23.x.
This is a breaking change if you rely on the `--pre` option being present in the generated file.
Now the `--pre` option should be added to `pip install` when the generated file is used.
This change enables the use of the generated file with the alternative pip replacement `uv`.
[jensens]

- Breaking: Drop official support for Python 3.7 (it is end of life).
[jensens]

- Document `mx.ini` sections `vcs` setting.
[jensens]

### 3.1.0 (2023-12-10)

- Provide `directory` default setting [rnix]
- Feature: Provide `directory` default setting [rnix]
- Feature: Include other INI config files [jensens]

### 3.0.0 (2023-05-08)
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ Optional a writable URL for pushes can be specified.
If the `pushurl` is set after initial checkout it is not applied.
To apply it remove the repository and checkout again.

#### `vcs = VCS`

The version control system to use.

Supported are:
- `git` (stable, tested)
- `fs` (stable, tested) - in fact no vcs, but points to a local directory.
This can be achieved without mxdev by using `-e PATH` in the requirements input file.
- `svn` (unstable, test needs rewrite)
- `gitsvn` (unstable, test needs rewrite)
- `hg` (unstable, test needs rewrite)
- `bzr` (unstable, test needs rewrite)
- `darcs` (unstable, test needs rewrite)

Defaults to `git`.

#### `branch = BRANCHNAME_OR_TAG`

The branch name or tag to checkout.
Expand All @@ -208,6 +224,7 @@ For specifying the path to the Python package, when it is not in the root of the
Default empty.

#### `target`

The target directory for source from this section.

Default to default target directory configured in the main section `[settings]` `default-target =` value.
Expand Down Expand Up @@ -261,7 +278,7 @@ Mxdev will

Now, use the generated requirements and constraints files with i.e. `pip install -r requirements-mxdev.txt`.

**mxdev >=2.0 needs pip version 22 at minimum to work properly**
**mxdev >=4.0 needs pip version 23 at minimum to work properly**

## Example Configuration

Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[project]
name = "mxdev"
description = "Enable to work with Python projects containing lots of packages, of which you only want to develop some."
version = "3.1.0"
version = "4.0.0"
keywords = ["pip", "vcs", "git", "development"]
authors = [
{name = "MX Stack Developers", email = "dev@bluedynamics.com" }
]
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "BSD 2-Clause License" }
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
5 changes: 1 addition & 4 deletions src/mxdev/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ def write_dev_sources(fio, packages: typing.Dict[str, typing.Dict[str, typing.An
continue
extras = f"[{package['extras']}]" if package["extras"] else ""
subdir = f"/{package['subdirectory']}" if package["subdirectory"] else ""
install_options = " --pre"
editable = (
f"""-e ./{package['target']}/{name}{subdir}{extras}{install_options}\n"""
)
editable = f"""-e ./{package['target']}/{name}{subdir}{extras}\n"""
logger.debug(f"-> {editable.strip()}")
fio.write(editable)
fio.write("\n\n")
Expand Down

0 comments on commit 8427d8a

Please sign in to comment.