Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.44 KB

index.rst

File metadata and controls

60 lines (38 loc) · 1.44 KB

Building from source

You will need to have Python 3 development files installed. On macOS, you will have these if you installed Python with brew. On Linux, you may need to install some packages (e.g., python3-dev and python3-venv).

You will also need a C++ toolchain. On macOS, Xcode will provide this for you. On Linux, you may need to install some more pacakges (e.g. build-esential).

Clone the git repository to a directory for development:

git clone https://github.com/ada-url/ada-python.git ada_url_python
cd ada_url_python

Create a virtual environment to use for building:

python3 -m venv env
source ./env/bin/activate

After that, you're ready to build the package:

python -m pip install -r requirements/development.txt
c++ -c "ada_url/ada.cpp" -fPIC -std="c++17" -O2 -o "ada_url/ada.o"
python -m build --no-isolation

This will create a .whl file in the dist directory. You can install it in other virtual environments on the same machine.

To run tests, first build a package. Then:

python -m pip install -e .
python -m unittest

Leave the virtual environment with the deactivate comamnd.

API Documentation

.. automodule:: ada_url
    :members:


Indices and tables