forked from commaai/panda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created python package and implemented industry best practices.
Supports python 2 and 3 (to the best of my testing ability at the time)
- Loading branch information
1 parent
0e46ca4
commit 6a25791
Showing
12 changed files
with
180 additions
and
101 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.*.swp | ||
*.o | ||
a.out | ||
|
||
*~ | ||
.#* |
This file was deleted.
Oops, something went wrong.
Empty file.
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
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 @@ | ||
[bdist_wheel] | ||
universal=1 |
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,64 @@ | ||
#-*- coding: utf-8 -*- | ||
|
||
""" | ||
Panda CAN Controller Dongle | ||
~~~~~ | ||
Setup | ||
````` | ||
$ pip install . # or python setup.py install | ||
""" | ||
|
||
import codecs | ||
import os | ||
import re | ||
from setuptools import setup, Extension | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
def read(*parts): | ||
"""Taken from pypa pip setup.py: | ||
intentionally *not* adding an encoding option to open, See: | ||
https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 | ||
""" | ||
return codecs.open(os.path.join(here, *parts), 'r').read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
setup( | ||
name='panda', | ||
version=find_version("panda", "__init__.py"), | ||
url='https://github.com/commaai/panda', | ||
author='Comma.ai', | ||
author_email='', | ||
packages=[ | ||
'panda', | ||
], | ||
platforms='any', | ||
license='MIT', | ||
install_requires=[ | ||
'libusb1 >= 1.6.4', | ||
'hexdump >= 3.3', | ||
'pycrypto >= 2.6.1', | ||
'tqdm >= 4.14.0', | ||
], | ||
ext_modules = [], | ||
description="Code powering the comma.ai panda", | ||
long_description=open(os.path.join(os.path.dirname(__file__), | ||
'README.md')).read(), | ||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: System :: Hardware", | ||
], | ||
) |
Empty file.
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
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
Oops, something went wrong.