Help and fixes are welcome!
Although Colorama has no requirements other than the Python standard library, development requires some Python packages, which are captured in requirements-dev.txt.
Throughout, if you're on a Mac, you can probably do something similar to the Linux instructions. Either use the makefile directly, or look in it to see what commands it executes, and manually execute something similar. PRs to automate for Mac appreciated! Especially if they just made the existing Linux Makefile targets work on Mac too.
Some common commands are captured as Linux makefile targets (which could perhaps be coaxed into running on OSX in Bash), and as Windows PowerShell scripts.
Task | Linux | Windows |
---|---|---|
Create & populate virtualenv. | make bootstrap |
.\bootstrap.ps1 |
Run tests. | make test |
.\test.ps1 |
Build a wheel. | make build |
.\build.ps1 |
Test the wheel. | make test-release |
.\test-release.ps1 |
Release the wheel on PyPI | make release |
.\release.ps1 |
Clean generated files & builds. | make clean |
.\clean.ps1 |
The Makefile is self-documenting, so 'make' with no args will describe each target.
-
Check the CHANGELOG is updated with everything since the last release.
-
Remove the '-pre' suffix from
__version__
incolorama/__init.py__.py
. -
Run the tests locally on your preferred OS, just to save you from doing the following time-consuming steps while there are still obvious problems in the code:
- Windows:
./test.ps1
- Linux:
make test
- Windows:
-
Verify you're all committed, merged to master, and pushed to origin (This triggers a Travis build, which we'll check later on)
-
Build the distributables (sdist and wheel), on either OS:
- Windows:
.\build.ps1
- Linux:
make build
- Windows:
-
Test the distributables on both OS. Whichever one you do 2nd will get an HTTP 400 response on uploading to test.pypi.org, but outputs a message saying this is expected and carries on:
- Windows:
./clean.ps1 && .\bootstrap.ps1 && .\build.ps1 && .\test-release.ps1
- Linux:
make clean bootstrap build test-release
(This currently only tests the wheel, but should soon test the sdist too.)
- Windows:
-
Check the Travis builds are complete and all passing. (This currently only tests on Linux, but should soon run on Windows too.)
-
Upload the distributables to PyPI:
- On Windows:
.\release.ps1
- On Linux:
make release
This should soon tag the release for you. Until then:
- On Windows:
-
Tag the current commit with the
__version__
fromcolorama/__init__.py
. We should start using annotated tags for releases, so:git tag -a -m "" $version git push --follow-tags
-
Bump the version number in
colorama/__init__.py
, and add the '-pre' suffix again, ready for the next release. Commit and push this (directly to master is fine.)