Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lorencarvalho committed May 2, 2018
1 parent 029bbe3 commit d7b8e44
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
image: latest

python:
version: 3.6
pip_install: true
12 changes: 6 additions & 6 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ cli
:members:
:show-inheritance:

builder
-------
constants
---

.. automodule:: shiv.builder
.. automodule:: shiv.constants
:members:
:show-inheritance:

constants
---------
builder
-------

.. automodule:: shiv.constants
.. automodule:: shiv.builder
:members:
:show-inheritance:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ shiv 🔪

Shiv is a command line utility for building fully self
contained Python zipapps as outlined in `Link [PEP 441] <http://legacy.python.org/dev/peps/pep-0441/>`
but with all their dependencies included.
but with all their dependencies included!

Contents:

Expand Down
9 changes: 5 additions & 4 deletions src/shiv/bootstrap/interpreter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
The code in this module is adapted from https://github.com/pantsbuild/pex
"""
import code
import sys

Expand All @@ -13,7 +16,7 @@ def execute_content(name, content):
ast = compile(content, name, "exec", flags=0, dont_inherit=1)
except SyntaxError:
raise RuntimeError(
"Unable to parse {}. Is it a Python script? Syntax correct?".format(name)
f"Unable to parse {name}. Is it a Python script? Syntax correct?"
)

old_name, old_file = globals().get("__name__"), globals().get("__file__")
Expand All @@ -40,9 +43,7 @@ def execute_interpreter():
name, content = sys.argv[1], fp.read()
except (FileNotFoundError, IsADirectoryError, PermissionError) as e:
raise RuntimeError(
"Could not open {} in the environment [{}]: {}".format(
sys.argv[1], sys.argv[0], e
)
f"Could not open {sys.argv[1]} in the environment [{sys.argv[0]}]: {e}"
)

sys.argv = sys.argv[1:]
Expand Down

0 comments on commit d7b8e44

Please sign in to comment.