Skip to content

Commit

Permalink
use pip install -e .
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Decker <christian.decker@homag.com>
  • Loading branch information
Christian Decker authored and meretp committed Feb 10, 2023
1 parent 8309604 commit d6932e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Here's the process to make changes to the codebase:
git checkout -b fix-or-improve-something
python -m venv ./venv
./venv/bin/activate
pip install -r requirements.txt
pip install -e .
```
4. Make some changes and commit them to the branch:
```sh
Expand Down
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

4 changes: 1 addition & 3 deletions spdx/parsers/parse_anything.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@


def parse_file(fn, encoding="utf-8"):
in_mode = "r"
builder_module = jsonyamlxmlbuilders
read_data = False
if fn.endswith(".rdf") or fn.endswith(".rdf.xml"):
in_mode = "rb"
encoding = None
parsing_module = rdf
builder_module = rdfbuilders
Expand All @@ -46,7 +44,7 @@ def parse_file(fn, encoding="utf-8"):
p = parsing_module.Parser(builder_module.Builder(), StandardLogger())
if hasattr(p, "build"):
p.build()
with open(fn, in_mode, encoding=encoding) as f:
with open(fn, "r", encoding=encoding) as f:
if read_data:
data = f.read()
return p.parse(data)
Expand Down

0 comments on commit d6932e2

Please sign in to comment.