Skip to content

Commit

Permalink
Merge pull request #17 from alanhdu/patch-fix
Browse files Browse the repository at this point in the history
Fix the `unpin_decorators.patch` file.
  • Loading branch information
jakirkham authored Oct 7, 2022
2 parents a41cd71 + ba5f62d commit 26ac563
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 22 additions & 8 deletions LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions build-locally.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source:
- unpin_decorator.patch

build:
number: 0
number: 1
noarch: python
script: {{ PYTHON }} -m pip install . --no-deps -vv

Expand Down
4 changes: 2 additions & 2 deletions recipe/unpin_decorator.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ index 277276c..a889b8c 100644
- func_code = f.__code__ # Python 3
-
- names = func_code.co_varnames
+ names = inspect.getfullargspec(func).args
+ names = inspect.getfullargspec(f).args
new_a = [fun(arg) if (name in varnames) else arg
for (arg, name) in zip(a, names)]
new_kw = {k: fun(v) if k in varnames else v
Expand All @@ -35,7 +35,7 @@ index 277276c..a889b8c 100644
- func_code = f.__code__ # Python 3
-
- names = func_code.co_varnames[1:]
+ names = inspect.getfullargspec(func).args[1:]
+ names = inspect.getfullargspec(f).args[1:]

new_a = [fun(arg) if (name=='fps') else arg
for (arg, name) in zip(a, names)]
Expand Down

0 comments on commit 26ac563

Please sign in to comment.