-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating pythondata-cpu-serv to 1.0.post66
Updated data to v1.0-16-gc0fc72b based on c0fc72b from https://github.com/olofk/serv. > commit c0fc72b > Author: Olof Kindgren <[email protected]> > Date: Mon Apr 27 13:58:32 2020 +0200 > > Add upduino2 servant target > Updated using 0.0.post50 from https://github.com/litex-hub/litex-data-auto
- Loading branch information
0 parents
commit b10024e
Showing
10 changed files
with
416 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**/verilog/**/*.v linguist-language=Verilog | ||
**/verilog/**/*.vh linguist-language=Verilog | ||
|
||
**/system_verilog/**/*.v linguist-language=SystemVerilog | ||
**/system_verilog/**/*.sv linguist-language=SystemVerilog | ||
**/system_verilog/**/*.vh linguist-language=SystemVerilog | ||
|
||
**/vhdl/**/*.vhdl linguist-language=VHDL | ||
**/vhdl/**/*.vh linguist-language=VHDL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# 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/ | ||
pip-wheel-metadata/ | ||
share/python-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/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# 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/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Always clone the full depth so git-describe works. | ||
git: | ||
depth: false | ||
|
||
language: python | ||
python: | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "nightly" # nightly build | ||
- "pypy3" | ||
|
||
install: | ||
- python setup.py install | ||
|
||
script: | ||
- python test.py | ||
|
||
deploy: | ||
provider: pypi | ||
username: __token__ | ||
distributions: sdist bdist_wheel | ||
server: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
edge: true # opt in to dpl v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
graft pythondata_cpu_serv/verilog/ | ||
global-exclude *.py[cod] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ACTIVATE=[[ -e venv/bin/activate ]] && source venv/bin/activate; | ||
|
||
SHELL := /bin/bash | ||
|
||
clean: | ||
rm -rf build dist litex_data_* | ||
|
||
.PHONY: clean | ||
|
||
venv-clean: | ||
rm -rf venv | ||
|
||
.PHONY: venv-clean | ||
|
||
venv: | ||
virtualenv --python=python3 venv | ||
${ACTIVATE} pip install twine | ||
|
||
.PHONY: venv | ||
|
||
build: | ||
${ACTIVATE} python setup.py sdist bdist_wheel | ||
|
||
.PHONY: build | ||
|
||
# PYPI_TEST = --repository-url https://test.pypi.org/legacy/ | ||
PYPI_TEST = --repository testpypi | ||
|
||
upload-test: build | ||
${ACTIVATE} twine upload ${PYPI_TEST} dist/* | ||
|
||
.PHONY: upload-test | ||
|
||
upload: build | ||
${ACTIVATE} twine upload | ||
|
||
.PHONY: upload | ||
|
||
install: | ||
${ACTIVATE} python setup.py install | ||
|
||
.PHONY: install | ||
|
||
test: | ||
${ACTIVATE} python test.py | ||
|
||
.PHONY: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# pythondata-cpu-serv | ||
|
||
Non-Python files needed for the cpu serv packaged | ||
into a Python module so they can be used with Python libraries and tools. | ||
|
||
This Useful for usage with tools like | ||
[LiteX](https://github.com/enjoy-digital/litex.git). | ||
|
||
The data files can be found under the Python module `pythondata_cpu_serv`. The | ||
`pythondata_cpu_serv.data_location` value can be used to find the files on the file | ||
system. | ||
|
||
Example of getting the data file directly; | ||
```python | ||
import pythondata_cpu_serv | ||
|
||
my_data_file = "abc.txt" | ||
|
||
with open(os.path.join(pythondata_cpu_serv.data_location, my_data_file)) as f: | ||
print(f.read()) | ||
``` | ||
|
||
Example of getting the data file using `litex.data.find` API; | ||
```python | ||
from pythondata_cpu_serv import data_file | ||
|
||
my_data_file = "abc.txt" | ||
|
||
with open(data_file(my_data_file)) as f: | ||
print(f.read()) | ||
``` | ||
|
||
|
||
The data files come from https://github.com/olofk/serv | ||
and are imported using `git subtrees` to the directory | ||
[pythondata_cpu_serv/verilog](pythondata_cpu_serv/verilog). | ||
|
||
|
||
|
||
## Installing from git repository | ||
|
||
## Manually | ||
|
||
You can install the package manually, however this is **not** recommended. | ||
|
||
``` | ||
git clone https://github.com/litex-hub/pythondata-cpu-serv.git | ||
cd pythondata-cpu-serv | ||
sudo python setup.py install | ||
``` | ||
|
||
## Using [pip](https://pip.pypa.io/) with git repository | ||
|
||
You can use [pip](https://pip.pypa.io/) to install the data package directly | ||
from github using; | ||
|
||
``` | ||
pip install --user git+https://github.com/litex-hub/pythondata-cpu-serv.git | ||
``` | ||
|
||
If you want to install for the whole system rather than just the current user, | ||
you need to remove the `--user` argument and run as sudo like so; | ||
|
||
``` | ||
sudo pip install git+https://github.com/litex-hub/pythondata-cpu-serv.git | ||
``` | ||
|
||
You can install a specific revision of the repository using; | ||
``` | ||
pip install --user git+https://github.com/litex-hub/pythondata-cpu-serv.git@<tag> | ||
pip install --user git+https://github.com/litex-hub/pythondata-cpu-serv.git@<branch> | ||
pip install --user git+https://github.com/litex-hub/pythondata-cpu-serv.git@<hash> | ||
``` | ||
|
||
### With `requirements.txt` file | ||
|
||
Add to your Python `requirements.txt` file using; | ||
``` | ||
-e git+https://github.com/litex-hub/pythondata-cpu-serv.git | ||
``` | ||
|
||
To use a specific revision of the repository, use the following; | ||
``` | ||
-e https://github.com/litex-hub/pythondata-cpu-serv.git@<hash> | ||
``` | ||
|
||
## Installing from [PyPi](https://pypi.org/project/pythondata-cpu-serv/) | ||
|
||
## Using [pip](https://pip.pypa.io/) | ||
|
||
``` | ||
pip install --user pythondata-cpu-serv | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import os.path | ||
__dir__ = os.path.split(os.path.abspath(os.path.realpath(__file__)))[0] | ||
data_location = os.path.join(__dir__, "verilog") | ||
src = "https://github.com/olofk/serv" | ||
|
||
# Module version | ||
version_str = "1.0.post66" | ||
version_tuple = (1, 0, 66) | ||
try: | ||
from packaging.version import Version as V | ||
pversion = V("1.0.post66") | ||
except ImportError: | ||
pass | ||
|
||
# Data version info | ||
data_version_str = "1.0.post16" | ||
data_version_tuple = (1, 0, 16) | ||
try: | ||
from packaging.version import Version as V | ||
pdata_version = V("1.0.post16") | ||
except ImportError: | ||
pass | ||
data_git_hash = "c0fc72b3535c6525ad93653d327080d9c85e9a8e" | ||
data_git_describe = "v1.0-16-gc0fc72b" | ||
data_git_msg = """\ | ||
commit c0fc72b3535c6525ad93653d327080d9c85e9a8e | ||
Author: Olof Kindgren <[email protected]> | ||
Date: Mon Apr 27 13:58:32 2020 +0200 | ||
Add upduino2 servant target | ||
""" | ||
|
||
# Tool version info | ||
tool_version_str = "0.0.post50" | ||
tool_version_tuple = (0, 0, 50) | ||
try: | ||
from packaging.version import Version as V | ||
ptool_version = V("0.0.post50") | ||
except ImportError: | ||
pass | ||
|
||
|
||
def data_file(f): | ||
"""Get absolute path for file inside pythondata_cpu_serv.""" | ||
fn = os.path.join(data_location, f) | ||
fn = os.path.abspath(fn) | ||
if not os.path.exists(fn): | ||
raise IOError("File {f} doesn't exist in pythondata_cpu_serv".format(f)) | ||
return fn |
Empty file.
Oops, something went wrong.