Skip to content

Instantly share code, notes, and snippets.

@tiran
Last active August 9, 2017 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiran/a281aa3baf9ea39e1d02800c1a7f8ea6 to your computer and use it in GitHub Desktop.
Save tiran/a281aa3baf9ea39e1d02800c1a7f8ea6 to your computer and use it in GitHub Desktop.
Mypy stubgen for FreeIPA
# mpypy in Fedora 26 is currently broken, https://bugzilla.redhat.com/show_bug.cgi?id=1479697
# sudo dnf install -y python3-mypy
python3 -m venv --system-site-packages /tmp/mypy
/tmp/mypy/bin/pip install --upgrade --force mypy
cd /path/to/freeipa
sudo dnf builddep -y --spec ./freeipa.spec.in
./autogen.sh
make
mkdir -p out
echo "api.bootstrap(ra_plugin='dogtag')" >> ipalib/__init__.py
PYTHONPATH=. /tmp/mypy/bin/stubgen --recursive ipaclient ipalib ipaplatform ipapython ipaserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment