Version: | see VERSION |
---|---|
Documentation: | https://pysaml2.readthedocs.io/ |
PySAML2 is a pure python implementation of SAML Version 2 Standard. It contains all necessary pieces for building a SAML2 service provider or an identity provider. The distribution contains examples of both. Originally written to work in a WSGI environment there are extensions that allow you to use it with other frameworks.
This is a Top-Hat-specific fork of PySAML2. It's published manually to JFrog and consumed by THM.
- On your branch, update the VERSION file - our convention seems to be
<PySAML2 base version>-N
whereN
is the number of TopHat's revision on top of the upstream version. E.g.4.6.5-2
is the second revision since merging the upstream4.6.5
version. - Create a virtualenv to build the package in
python3 -m venv <some name>
. <some name>/bin/activate
- In the venv,
python setup.py bdist_wheel --universal
- Find the wheel file in
dist/
folder
docker cp
the wheel file generated above into your development THM containerth shell thm
to enter the containerpip list | grep pysaml
- note the currently installed versionpip uninstall pysaml2-tophat
re
- this step may be excessive, but confirm that THM either won't start or SSO is broken. This will guarantee that when you install the new version, it's the new version that's running.pip install <path to wheel file>
pip list
- confirm the new version is installedre
and QA
- Merge your branch to master
- Create a new Github release using the version convention described above
- Attach the wheel file to the release assets for posterity
- Get a member of
@platform_help_me
to upload the wheel file to JFrog for you - Start a new THM branch
- Update the version of
pysaml2-tophat
inrequirements_common.txt
. It won't be exactly the tag you used. E.g. if you put4.6.5-2
in the VERSION file, you should put4.6.5.post2
here. It should match part of the wheel file name. th shell thm
to enter your dev containerpip list | grep pysaml
- note the currently installed versionpip uninstall pysaml2-tophat
re
- this step may be excessive, but confirm that THM either won't start or SSO is broken. This will guarantee that when you install the new version, it's the new version that's running.pip install -r requirements.txt
pip list
- confirm the new version is installedre
and smoke test- Merge THM branch
PySAML2 uses the pytest framework for testing. To run the tests on your system's version of python:
- Create and activate a virtualenv
- Inside the virtualenv, install the dependencies needed for testing
pip install -r tests/test-requirements.txt
- Run the tests
py.test tests
To run tests in multiple python environments, you can use pyenv with tox.
To help out, you could:
- Test and report any bugs or other difficulties.
- Implement missing features.
- Write more unit tests.
If you have the time and inclination I'm looking for Collaborators