Skip to content

Commit

Permalink
Updated readme and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
molejar committed Nov 21, 2019
1 parent e3716e1 commit 8e2b55d
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 34 deletions.
124 changes: 111 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,113 @@
# directories
.idea
.pytest*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.eggs
*.egg-info
__pycache__
build
dist
temp
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# files
*.pyc
#*.dtb
#*.dts
# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# pyCharm
.idea

# VSCode
.vscode

# other
temp
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
[![Python Version](https://img.shields.io/pypi/pyversions/fdt.svg)](https://www.python.org)

This python module is usable for manipulation with [Device Tree Data](https://www.devicetree.org/) and primary was
created for [i.MX Smart-Boot Tool](https://github.com/molejar/imxsb)
created for [imxsb tool](https://github.com/molejar/imxsb)

> Some parts in this module have been inspired from: https://github.com/superna9999/pyfdt project.
## Dependencies

- [Python](https://www.python.org) - Python 3.x interpreter

## Installation

```bash
Expand Down Expand Up @@ -42,7 +38,8 @@ pip install -U -e .

## Usage

The API of **fdt** module is intuitive and implementing all general requirements for manipulation with FDT Nodes, Properties and dts/dtb files.
**fdt** module has intuitive and self describing API, what is presented in following example. Many of general requirements
for manipulation with FDT Nodes, Properties and dts/dtb files are already implemented.

```python
import fdt
Expand Down Expand Up @@ -122,7 +119,7 @@ optional arguments:
```
### $ pydtc unpack [-h] [-s TAB_SIZE] [-o DTS_FILE] dtb_file
#### $ pydtc unpack [-h] [-s TAB_SIZE] [-o DTS_FILE] dtb_file
Unpack Device Tree from binary blob *.dtb into readable text file *.dts
Expand Down
22 changes: 8 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@
from fdt import __version__, __license__, __author__, __contact__


def long_description():
try:
import pypandoc

readme_path = path.join(path.dirname(__file__), 'README.md')
return pypandoc.convert(readme_path, 'rst')
except (IOError, ImportError):
return (
"More on: https://github.com/molejar/pyFDT"
)
def get_long_description():
with open(path.join(path.dirname(path.abspath(__file__)), 'README.md'), encoding='utf8') as fp:
return fp.read()


setup(
Expand All @@ -39,13 +32,14 @@ def long_description():
author_email=__contact__,
url='https://github.com/molejar/pyFDT',
description='Flattened Device Tree Python Module',
long_description=long_description(),
#long_description_content_type='text/x-rst',
#long_description_content_type='text/markdown',
long_description=get_long_description(),
long_description_content_type='text/markdown',
python_requires='>=3.6',
packages=['fdt'],
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: OS Independent',
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
Expand Down

0 comments on commit 8e2b55d

Please sign in to comment.