File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1
1
.. include :: ./_build/README.pprst
2
2
3
+ Building from source
4
+ ====================
5
+
6
+ You will need to have Python 3 development files installed.
7
+ On macOS, you will have these if you installed Python with ``brew ``.
8
+ On Linux, you may need to install some packages (e.g., ``python3-dev `` and ``python3-venv ``).
9
+
10
+ You will also need a C++ toolchain.
11
+ On macOS, Xcode will provide this for you.
12
+ On Linux, you may need to install some more pacakges (e.g. ``build-esential ``).
13
+
14
+ Clone the git repository to a directory for development:
15
+
16
+ .. code-block :: sh
17
+
18
+ git clone https://github.com/ada-url/python/ ada_url_python
19
+ cd ada_url_python
20
+
21
+ Create a virtual environment to use for building:
22
+
23
+ .. code-block :: sh
24
+
25
+ python3 -m venv env
26
+ source ./env/bin/activate
27
+
28
+ After that, you're ready to build the package:
29
+
30
+ .. code-block :: sh
31
+
32
+ python -m pip install -r requirements/development.txt
33
+ c++ -c " ada_url/ada.cpp" -fPIC -std=" c++17" -O2 -o " ada_url/ada.o"
34
+ python -m build --no-isolation
35
+
36
+ This will create a `.whl ` file in the `dist ` directory. You can install it in other
37
+ virtual environments on the same machine.
38
+
39
+ To run tests, first build a package. Then:
40
+
41
+ .. code-block :: sh
42
+
43
+ python -m pip install -e .
44
+ python -m unittest
45
+
46
+ Leave the virtual environment with the ``deactivate `` comamnd.
47
+
3
48
API Documentation
4
49
=================
5
50
You can’t perform that action at this time.
0 commit comments