Skip to content

Commit

Permalink
Add support for python virtual envrionment (#52)
Browse files Browse the repository at this point in the history
Python virtual environment makes it easier to isolate python
ennvironments. It ensures that user and system installed modules do not
conflict with one another. Shaving the yak.
  • Loading branch information
mjmayer committed Nov 7, 2020
1 parent f5c6a82 commit 1bd4186
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ _build/
#ignore vim swp files
*.swp
*.swo

# python virtual envrionment
venv/
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@ for testing purposes.
1. Clone this repo
`git clone https://github.com/mailsac/mailsac-examples.git`

2. Install sphinx
`pip install Sphinx sphinx_rtd_theme sphinx-tabs`

3. Change directories to the cloned repo
2. Change directories to the cloned repo
`cd mailsac-examples`

4. Run build script
3. Setup virtual environment (option but helps isolate python modules)
`python3 -m venv venv`
`source venv/bin/activate`

4. Install sphinx
`pip3 install Sphinx sphinx_rtd_theme sphinx-tabs`

5. Run build script
`make html`

5. Build results can be found in `_build/html/`
6. Build results can be found in `_build/html/`

6. Optional - run a server to view the html output.
7. Optional - run a server to view the html output.
`npm install http-server -g`
`http-server _build/html`

7. Alternatively the reStructuredText Visual Studio Code extension can be used for live previews
8. Alternatively the reStructuredText Visual Studio Code extension can be used for live previews

Copyright © 2019 by Forking Software LLC
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', 'venv']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand Down

0 comments on commit 1bd4186

Please sign in to comment.