mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-03-28 16:33:58 +00:00
Updated to newer technique
This commit is contained in:
parent
8dfaeb8cba
commit
c154b90f73
2 changed files with 32 additions and 0 deletions
content/blog
31
content/blog/pipeditable.md
Normal file
31
content/blog/pipeditable.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: "Pip Editable"
|
||||
date: 2020-04-11T20:27:35-04:00
|
||||
draft: true
|
||||
tags: ["python"]
|
||||
---
|
||||
|
||||
I've found it to be incredibly helpful to emulate having a library installed on my system rather than depending on my local directory path to pick up my file edits. To do this in a python project, we need to add the `--editable` flag to a pip install.
|
||||
|
||||
First uninstall whatever version of your `library` you have.
|
||||
```bash
|
||||
pip uninstall library
|
||||
```
|
||||
|
||||
Then in your folder with the `setup.py` run the following command
|
||||
```bash
|
||||
pip install --editable .
|
||||
```
|
||||
|
||||
This will then create a symlink from your site-packages directory to the directory in which your code lives.
|
||||
|
||||
Once you're ready to install it formally,
|
||||
```bash
|
||||
pip uninstall library
|
||||
pip install .
|
||||
```
|
||||
|
||||
Distribute it,
|
||||
```bash
|
||||
pip wheel .
|
||||
```
|
|
@ -4,6 +4,7 @@ date: 2020-02-21T22:42:55-05:00
|
|||
draft: false
|
||||
tags: [ "python" ]
|
||||
---
|
||||
**Deprecated in favor of [pip install editable](https://brandonrozek.com/blog/pipeditable)**
|
||||
|
||||
I've found it to be incredibly helpful to emulate having a library installed on my system rather than depending on my local directory path to pick up my file edits. To do this in a python project where you've defined a `setup.py`, you can specify the command `develop`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue