Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Fourré committed Mar 29, 2023
1 parent 332e844 commit 2e93de9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ of `minified.py`
```py
deps = ("cowsay",)

exec(
"""K='pip' G='PATH' import venv,sys,inspect as L,subprocess as M from os.path import realpath as C,dirname as N,join as D,basename as H,isdir,splitext as O from os import environ as A,execvp as P I=next(reversed(L.stack())).frame E=C(I.f_globals['__file__']) Q=N(E) R=O(H(E))[0] B=D(Q,f".{R}.venv") if not isdir(B):A['P']=G;venv.create(B,with_pip=True) J=D(B,'bin') F=C(sys.executable) if F!=C(D(J,H(F))):A.update({'VIRTUAL_ENV':B,G:f"{J}:{A[G]}"});P(E,sys.argv) if'P'in A: for S in (('--upgrade',K,'setuptools','wheel'),I.f_locals['deps']):M.check_call([F,'-m',K,'install',*(S)])""".replace(
"\v", "\n"
)
)
exec("N='pip'\nM='VIRTUAL_ENV'\nG='PATH'\nF='P'\nimport venv,sys,inspect as O\nfrom subprocess import check_call as P,getoutput as Q\nfrom os.path import realpath as C,dirname as R,join as D,basename as H,isdir,splitext as S\nfrom os import environ as A,execvp as T\nI=next(reversed(O.stack())).frame\nE=C(I.f_globals['__file__'])\nU=R(E)\nV=S(H(E))[0]\nB=D(U,'.'+V+'.venv')\nif M!=B:\n if not isdir(B):A[F]=G;venv.create(B,with_pip=True)\n J=D(B,'bin');K=C(sys.executable)\n if K!=C(D(J,H(K))):A.update({M:B,G:J+':'+A[G]});T(E,sys.argv)\n L=I.f_locals['deps'];[P([N,'install',*(B)])for B in(('--upgrade',N,'setuptools','wheel'),L)if F in A];[Q('pip install '+B)for B in L if F in A]")

import cowsay

Expand Down
5 changes: 1 addition & 4 deletions test_minified.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env python3.10
deps = ("cowsay",)

exec(
"""K='pip' G='PATH' import venv,sys,inspect as L,subprocess as M from os.path import realpath as C,dirname as N,join as D,basename as H,isdir,splitext as O from os import environ as A,execvp as P I=next(reversed(L.stack())).frame E=C(I.f_globals['__file__']) Q=N(E) R=O(H(E))[0] B=D(Q,f".{R}.venv") if not isdir(B):A['P']=G;venv.create(B,with_pip=True) J=D(B,'bin') F=C(sys.executable) if F!=C(D(J,H(F))):A.update({'VIRTUAL_ENV':B,G:f"{J}:{A[G]}"});P(E,sys.argv) if'P'in A: for S in (('--upgrade',K,'setuptools','wheel'),I.f_locals['deps']):M.check_call([F,'-m',K,'install',*(S)])""".replace(
"\v", "\n"
)
"N='pip'\nM='VIRTUAL_ENV'\nG='PATH'\nF='P'\nimport venv,sys,inspect as O\nfrom subprocess import check_call as P,getoutput as Q\nfrom os.path import realpath as C,dirname as R,join as D,basename as H,isdir,splitext as S\nfrom os import environ as A,execvp as T\nI=next(reversed(O.stack())).frame\nE=C(I.f_globals['__file__'])\nU=R(E)\nV=S(H(E))[0]\nB=D(U,'.'+V+'.venv')\nif M!=B:\n if not isdir(B):A[F]=G;venv.create(B,with_pip=True)\n J=D(B,'bin');K=C(sys.executable)\n if K!=C(D(J,H(K))):A.update({M:B,G:J+':'+A[G]});T(E,sys.argv)\n L=I.f_locals['deps'];[P([N,'install',*(B)])for B in(('--upgrade',N,'setuptools','wheel'),L)if F in A];[Q('pip install '+B)for B in L if F in A]"
)

import cowsay
Expand Down

0 comments on commit 2e93de9

Please sign in to comment.