Skip to content

Commit

Permalink
Update Makefile & build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
msanders committed Feb 8, 2020
1 parent e55891b commit 88d6cda
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
.PHONY: build
build: ## Build debug target for development.
rustup default nightly-2019-10-05
pip install -r requirements.txt
python setup.py build

.PHONY: help
help: ## Print help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \
$(MAKEFILE_LIST) | sort
help: ## Print help information.
@awk 'BEGIN { \
FS = ":.*?## " \
} /^[a-zA-Z_-]+:.*?## / { \
printf "\033[36m%-30s\033[0m %s\n", $$1, $$2 \
}' $(MAKEFILE_LIST)

.PHONY: install
install: ## Install local target.
pip install .

.PHONY: mac
mac: ## Build wheel distributions for macOS.
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,30 @@ If that fails, install [rustup](https://rustup.rs) and then run:
$ pip install -U setuptools-rust
$ pip install -U autopy

Another option is to compile from the latest source on the GitHub repository:
Another option is to build from the latest source on the GitHub repository:

$ git clone git://github.com/autopilot-rs/autopy-rs.git
$ cd autopy
$ rustup default nightly-2019-10-05
$ pip install -r requirements.txt
$ python setup.py build
# python setup.py install
$ make
$ make install

**Note**: AutoPy currently requires the `2019-10-05` Rust nightly in order to
build from source. This is to maintain compatibility with an older version of
PyO3, as the latest version has dropped Python 2 support. Python 2 support will
likely be dropped from AutoPy as well sometime later this year, depending on
how necessary it is to upgrade to a more recent version of PyO3 or Rust. In the
meantime, it may be necessary to install the required nightly via the following
when building locally:

```
rustup install nightly 2019-10-05 --force
```

This is due to rustup complaining that it doesn't include certain components
such as `rustfmt`.

Additional instructions for installing from source on Windows are available [here](https://github.com/autopilot-rs/autopy/blob/master/scripts/windows-setup.md).
Additional instructions for installing from source on Windows are available
[here](https://github.com/autopilot-rs/autopy/blob/master/scripts/windows-setup.md).

### Hello World

Expand Down

0 comments on commit 88d6cda

Please sign in to comment.