Skip to content

Commit

Permalink
Fix #99, continue if a local package isn't exists
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
  • Loading branch information
damnever committed Jun 19, 2022
1 parent 2a4f66c commit 7702b44
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
matrix:
python-version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pip install git+https://github.com/damnever/pigar.git@[master or other branch] -

If the requirements.txt is overwritten, ``pigar`` will show the difference between the old and the new.

**NOTE**, `pigar` will search the packages in local environment first, then it will search missing packages in PyPI.

- If you do not know the import name that belongs to a specific package (more generally, does `Import Error: xxx` drive you crazy?), such as `bs4` which may come from `beautifulsoup4` or `MySQLdb` which could come from `MySQL_Python`, try searching for it:

```
Expand Down Expand Up @@ -81,6 +83,16 @@ pip install git+https://github.com/damnever/pigar.git@[master or other branch] -

### FAQ

<details>
<summary>
Is `pigar` a dependency management tool?
</summary>

**No.** I've thought about it many times, but there is too much dirty work to be done to make `pigar`'s way reliable.

I like the way `pigar` does the job, but sadly, `pigar` does a bad job of managing dependencies, `pigar` is more like a tool to assist an old project to migrate to a new development workflow.
</details>

<details>
<summary>
(1) Why `pigar` generates multiple packages for same import name?
Expand Down
2 changes: 1 addition & 1 deletion pigar/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _search_path(path):
line = line.strip()
if line != '.':
dev_dir = line
if not dev_dir:
if not dev_dir or not pathlib.exists(dev_dir):
continue
# Egg info path.
info_dir = [
Expand Down

0 comments on commit 7702b44

Please sign in to comment.