Metadata-Version: 2.1
Name: syspath
Version: 2.0.5
Summary: Easily add common paths to sys.path
Home-page: https://github.com/albertyw/syspath
Author: Albert Wang
Author-email: git@albertyw.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Software Development
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
License-File: LICENSE

SysPath
=======

[![PyPI](https://img.shields.io/pypi/v/syspath.svg)]( https://pypi.python.org/pypi/syspath/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/syspath)
![PyPI - License](https://img.shields.io/pypi/l/syspath)

[![Build Status](https://drone.albertyw.com/api/badges/albertyw/syspath/status.svg)](https://drone.albertyw.com/albertyw/syspath)
[![Dependency Status](https://pyup.io/repos/github/albertyw/syspath/shield.svg)](https://pyup.io/repos/github/albertyw/syspath/)
[![Code Climate](https://codeclimate.com/github/albertyw/syspath/badges/gpa.svg)](https://codeclimate.com/github/albertyw/syspath)
[![Code Climate Test Coverage](https://codeclimate.com/github/albertyw/syspath/badges/coverage.svg)](https://codeclimate.com/github/albertyw/syspath/coverage)


SysPath is a package to easily set common paths into `sys.path`. Instead
of having to do a lot of path manipulation to properly import files, a
file can import from SysPath instead.

Installation
------------

```bash
pip install syspath
```

Usage
-----

To append the current file's directory to `sys.path`:

```python
import syspath
syspath.append_current_path()
# or
from syspath import current_path
```

To append the current file's parent directory to `sys.path`:

```python
import syspath
syspath.append_parent_path()
# or
from syspath import parent_path
```

To append the current file's git repository root to `sys.path`:

```python
import syspath
syspath.append_git_root()
# or
from syspath import git_root
```

Each of the shortcut modules also provide a `path` variable that can be
used to get the path added.

Development
-----------

```bash
pip install -r requirements-test.txt
mypy syspath --strict
coverage run setup.py test
coverage report
flake8
```

Publishing
----------

```bash
pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*
```


