mirror of https://github.com/Askill/claude.git
Minor building documentation updates
Fix some typos, clarify some things, and TechWizzart has confirmed that the windows instructions work, so remove the disclaimer.
This commit is contained in:
parent
574052bad0
commit
edfc583c58
29
BUILDING.md
29
BUILDING.md
|
|
@ -16,27 +16,24 @@ python ./toy_model.py
|
|||
|
||||
Below are more specific instructions to get setup for various operating systems.
|
||||
|
||||
## Windows (not tested)
|
||||
|
||||
As stated, these are not tested, but these are the hypothetical steps to set up and build CLAuDE on Windows.
|
||||
Please report if these do or do not work, so documentation can be updated.
|
||||
## Windows
|
||||
|
||||
### 1. Clone or download the repository
|
||||
If you plan on contributing to this project, you will need to use git in some way to clone the project. Otherwise, simply selecting to download the repo will do.
|
||||
Various git programs, such as [GitHub Desktop](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-a-repository-from-github-to-github-desktop), [GitKraken](https://support.gitkraken.com/working-with-repositories/open-clone-init/), and [git from Windows](https://gitforwindows.org/) are available to clone the repository with git. Each of these provide different levels of features and different levels of complexity.
|
||||
Various git programs, such as [GitHub Desktop](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-a-repository-from-github-to-github-desktop), [GitKraken](https://support.gitkraken.com/working-with-repositories/open-clone-init/), and [git for Windows](https://gitforwindows.org/) are available to clone the repository with git. Each of these provide different levels of features and different levels of complexity.
|
||||
|
||||
### 2. Install Python, pip and a compiler
|
||||
To build this project, you will need Python, a compiler for the C code that Cython generates, and several python libraries that will be installed with pip.
|
||||
Pip is a package manager, a program which simplifies installation of software.
|
||||
Pip is a package manager, a program which simplifies installation of software, in this case, python libraries.
|
||||
|
||||
You can install python from [it's website](https://www.python.org/downloads/windows/).
|
||||
You can install python from [its website](https://www.python.org/downloads/windows/).
|
||||
|
||||
If you do not already have pip installed, follow the instructions on the [pip website](https://pip.pypa.io/en/stable/installing/) to install it.
|
||||
If you do not already have pip installed (it should be installed with python if you have an up to date version), follow the instructions on the [pip website](https://pip.pypa.io/en/stable/installing/) to install it.
|
||||
|
||||
#### Compiler
|
||||
A compiler must then be installed. According to [the cython documentation](https://cython.readthedocs.io/en/latest/src/quickstart/install.html), you can use either [MinGW](https://osdn.net/projects/mingw/releases/) or Microsoft Visual C.
|
||||
If you choose to use MinGW, follow the instructions in the [cython documentation](https://cython.readthedocs.io/en/latest/src/tutorial/appendix.html) to get it set up.
|
||||
If you choose to use Microsoft Visual C/C++, follow the instructions on the [Python website](https://wiki.python.org/moin/WindowsCompilers)
|
||||
If you choose to use Microsoft Visual C/C++, follow the instructions on the [Python website](https://wiki.python.org/moin/WindowsCompilers).
|
||||
|
||||
### 3. Use pip to install python libraries
|
||||
Using command prompt, install the pip packages [cython](https://pypi.org/project/Cython/), [numpy](https://pypi.org/project/numpy/), and [matplotlib](https://pypi.org/project/matplotlib/), as well as [setuptools](https://pypi.org/project/setuptools/), if for some reason it is not already installed.
|
||||
|
|
@ -54,7 +51,7 @@ python claude_setup.py build_ext --inplace
|
|||
This will convert the `.pyx` files in the repository to C files, then compile them.
|
||||
|
||||
### 5. Run the model
|
||||
Simply run in your command prompt, while in the directory containing this file.
|
||||
Simply run this in your command prompt, while in the directory containing this file.
|
||||
```
|
||||
python toy_model.py
|
||||
```
|
||||
|
|
@ -70,7 +67,7 @@ The following programs and libraries are required to build CLAuDE:
|
|||
- numpy
|
||||
- matplotlib
|
||||
|
||||
If you're using apt as your package manager, these correspond to the packages `git` `python3` `python3-setuptools` `cython3` `python3-numpy` `python3-matplotlib`
|
||||
If you're using apt as your package manager, these correspond to the packages `git` `python3` `python3-setuptools` `cython3` `python3-numpy` `python3-matplotlib`.
|
||||
|
||||
### 1. Clone the repository.
|
||||
Using the git command line, and cloning via https, this command will do it:
|
||||
|
|
@ -104,16 +101,15 @@ This means that you did not install the equivalent of apt's `python3-dev` packag
|
|||
This likely means that the compiler building the libraries is not being told to search the proper directories for header files to include.
|
||||
One such case where this can happen is when you have libxcrypt installed, so Python.h includes `<crypt.h>`, but setuptools does not tell the compiler where to search for that.
|
||||
There is probably a proper solution to this, but I don't know it, so for now, you can work around this by telling it manually what to include.
|
||||
To find the header you need to include, you can use `find`.
|
||||
For example, with following error:
|
||||
```
|
||||
/usr/include/python3.8/Python.h:44:10: fatal error: crypt.h: No such file or directory
|
||||
44 | #include <crypt.h>
|
||||
|
|
||||
```
|
||||
You need to find where the crypt.h header is to tell setuptools where to include it, so you can use find.
|
||||
You can use find in the format `find dir/ -name "pattern"` to recursively search directories and get the full path of a the header file you are searching for.
|
||||
If the #include has a directory included, use the directory which contains that directory.
|
||||
You need to find where the crypt.h header is to tell setuptools where to include it, so you can use the aptly named `find`.
|
||||
You can use `find` in the format `find dir/ -name "pattern"` to recursively search directories from `dir/` and get the full path of the header file you are searching for.
|
||||
If the #include has a directory included (e.g. `#include <blah/foo.h>`), use the directory which contains that directory (if `foo.h` is in `/usr/include/alice/blah/foo.h`, you want `/usr/include/alice`).
|
||||
|
||||
So for example, you use `find /usr -name "crypt.h"` to find the full path of the crypt.h header that Python.h is looking to include.
|
||||
I got the output `/usr/include/tirpc/rpcsvc/crypt.h`, so now I know where that file is found, and I can instruct setuptools to include it.
|
||||
|
|
@ -138,9 +134,10 @@ Please report if these do or do not work, so documentation can be updated.
|
|||
|
||||
### 1. Install HomeBrew
|
||||
HomeBrew is a package manager, software which simplifies the installation of various software.
|
||||
You can install HomeBrew from [it's website](https://brew.sh/).
|
||||
You can install HomeBrew with instructions from [its website](https://brew.sh/).
|
||||
|
||||
### 2. Clone the repository
|
||||
If you plan on contributing to this project, you will need to use git in some way to clone the project. Otherwise, simply selecting to download the repo will do.
|
||||
Various git programs, such as [GitHub Desktop](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-a-repository-from-github-to-github-desktop), [GitKraken](https://support.gitkraken.com/working-with-repositories/open-clone-init/), or just git are available to clone the repository. Each of these provide different levels of features and different levels of complexity.
|
||||
git can be installed through homebrew using `brew install git`.
|
||||
Using git, you can clone the repository via https with this command:
|
||||
|
|
|
|||
Loading…
Reference in New Issue