Skip to content

Commit

Permalink
https://github.com/dictation-toolbox/natlinkcore/issues/58
Browse files Browse the repository at this point in the history
Instructions on using build and pip.
  • Loading branch information
dougransom committed Oct 23, 2023
1 parent 7c3fdd1 commit 5d3aa00
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,27 @@ fixes.

Mandy Python IDEs such as [Visual Studio Code](https://code.visualstudio.com/) have build in support for test frameworks and make it easy to run and debug pytest. see [Visual Studio Code for testing](https://code.visualstudio.com/docs/python/testing).

## Working on natlinkcore

## Building the Python Package Locally

The build happens through a powershell script. You don't have to know much powershell.
The powershell script runs the tests using [pytest](https://docs.pytest.org/).

The package is built with [Flit](https://flit.pypa.io/). The package will be produced in
dist/natlinkcore-x.y.z-py3-none-any.whl. To install it `py -m pip install dist/natlinkcore-x.y.z-py3-none-any.whl` replacing x.y with the version numbers.

Normally if you are developing natlinkcore, you will with instead to install with `py -m pip install -e .`, which will
let you make and test changes without reinstalling natlinkcore with pip. **Note the flit install --symlink or --pth-file options are problematic so just use pip.**


To start a powershell from the command prompt, type `powershell`.

To build the package:
Checkout natlinkcore from github. Perform an editable install `pip install -e .` from the natlinkcore project root.

## Building the Python Package Locally

`py -m flit build` from powershell or command prompt, which will run the the tests in natlinkcore/test, then build the the package.


To publish the package to [The Python Package Index (PyPI)](https://pypi.org/)

`publish_natlinkcore` from powershell.

The package is built with the [Python build command](https://pypi.org/project/build/):
`py -m build`.
Install build into your environment:
`pip install build`.

## Publishing a Release

If you are ready to build and publish a release, [draft a release](https://github.com/dictation-toolbox/natlinkcore/releases/new), and hit the "Publish release" button. That will create the release, build the files required, and upload them to [pypi natlinkcore](https://pypi.org/project/natlinkcore/).

## Publishing checklist
### Publishing checklist
Before you bump the version number in __init__.py and publish:
- Check the pyroject.toml file for package dependancies. Do you need a specfic or newer version of
a dependancy such as dtactions? Then add or update the version # requirement in dtactions.
- don't publish if the tests are failing. The `publish_natlinkcore` will prevent this, please don't work around it.

- check the tests are working locally.

## Debugging Instructions

Expand Down

0 comments on commit 5d3aa00

Please sign in to comment.