6 Commits

Author SHA1 Message Date
e0e2ab5526 Update packaging data for PyPI
This makes some minor adjustments, plus some general updates. In short:

* Mark stcgal as stable
* Make tqdm and pyserial requirements more specific
* Add a new long description, specific for PyPI
* Add documentation files to distribution
2018-09-23 22:04:52 +02:00
4cc0deb8e9 Prepare for v1.5 2018-09-23 20:42:06 +02:00
5ab2a73411 Merge pull request #45 from Seanjimon/add_tqdm_dependency
Add tqdm as required package. Otherwise missing dependency.
2018-09-20 18:06:10 +02:00
4a40d5613a add tqdm as required package. Otherwise missing dependency 2018-09-20 17:15:42 +02:00
83c0b47f62 Update installation instructions
The easiest way to install is arguably by using pip, so recommend that.
2018-09-06 21:54:09 +02:00
b0e882ff32 Merge branch 'better-docs' 2018-09-06 21:07:49 +02:00
6 changed files with 38 additions and 11 deletions

View File

@ -11,7 +11,7 @@ python:
before_install: before_install:
- sudo apt install rpm dpkg-dev debhelper dh-python python3-setuptools fakeroot python3-serial python3-yaml - sudo apt install rpm dpkg-dev debhelper dh-python python3-setuptools fakeroot python3-serial python3-yaml
install: install:
- pip install pyserial pyusb tqdm - pip install pyusb
script: script:
- python setup.py build - python setup.py build
- python setup.py test - python setup.py test

View File

@ -3,8 +3,16 @@ Installation
stcgal requires Python 3.2 (or later) and pySerial. USB support is stcgal requires Python 3.2 (or later) and pySerial. USB support is
optional and requires pyusb 1.0.0b2 or later. You can run stcgal optional and requires pyusb 1.0.0b2 or later. You can run stcgal
directly with the included ```stcgal.py``` script. The recommended directly with the included ```stcgal.py``` script if the dependencies
method for permanent installation is to use Python's setuptools. Run are already installed.
```./setup.py build``` to build and ```sudo ./setup.py install```
to install stcgal. A permanent installation provides the ```stcgal``` There are several options for permanent installation:
command.
* Use Python3 and ```pip```. Run
```pip3 install git+https://github.com/grigorig/stcgal.git```
to install the latest version of stcgal globally on your system.
This may require administrator/root permissions for write access
to system directories.
* Use setuptools. Run ```./setup.py build``` to build and
```sudo ./setup.py install``` to install stcgal.

18
doc/PyPI.md Normal file
View File

@ -0,0 +1,18 @@
stcgal - STC MCU ISP flash tool
===============================
stcgal is a command line flash programming tool for [STC MCU Ltd](http://stcmcu.com/).
8051 compatible microcontrollers.
STC microcontrollers have an UART/USB based boot strap loader (BSL). It
utilizes a packet-based protocol to flash the code memory and IAP
memory over a serial link. This is referred to as in-system programming
(ISP). The BSL is also used to configure various (fuse-like) device
options. Unfortunately, this protocol is not publicly documented and
STC only provide a (crude) Windows GUI application for programming.
stcgal is a full-featured Open Source replacement for STC's Windows
software; it supports a wide range of MCUs, it is very portable and
suitable for automation.
[See the GitHub page for more information](https://github.com/grigorig/stcgal).

View File

@ -24,14 +24,15 @@
import stcgal import stcgal
from setuptools import setup, find_packages from setuptools import setup, find_packages
with open("README.md", "r") as fh: with open("doc/PyPI.md", "r") as fh:
long_description = fh.read() long_description = fh.read()
setup( setup(
name = "stcgal", name = "stcgal",
version = stcgal.__version__, version = stcgal.__version__,
packages = find_packages(exclude=["doc", "tests"]), packages = find_packages(exclude=["doc", "tests"]),
install_requires = ["pyserial"], data_files = [("doc", ["README.md", "doc/FAQ.md", "doc/MODELS.md", "doc/USAGE.md"])],
install_requires = ["pyserial>=3.0", "tqdm>=4.0.0"],
extras_require = { extras_require = {
"usb": ["pyusb>=1.0.0"] "usb": ["pyusb>=1.0.0"]
}, },
@ -50,7 +51,7 @@ setup(
license = "MIT License", license = "MIT License",
platforms = "any", platforms = "any",
classifiers = [ classifiers = [
"Development Status :: 4 - Beta", "Development Status :: 5 - Production/Stable",
"Environment :: Console", "Environment :: Console",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",

View File

@ -1 +1 @@
__version__ = "1.4" __version__ = "1.5"

View File

@ -214,7 +214,7 @@ def cli():
# check arguments # check arguments
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
description="stcgal {} - an STC MCU ISP flash tool\n".format(stcgal.__version__) + description="stcgal {} - an STC MCU ISP flash tool\n".format(stcgal.__version__) +
"(C) 2014-2017 Grigori Goronzy\nhttps://github.com/grigorig/stcgal") "(C) 2014-2018 Grigori Goronzy and others\nhttps://github.com/grigorig/stcgal")
parser.add_argument("code_image", help="code segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?') parser.add_argument("code_image", help="code segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
parser.add_argument("eeprom_image", help="eeprom segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?') parser.add_argument("eeprom_image", help="eeprom segment file to flash (BIN/HEX)", type=argparse.FileType("rb"), nargs='?')
parser.add_argument("-a", "--autoreset", help="cycle power automatically by asserting DTR", action="store_true") parser.add_argument("-a", "--autoreset", help="cycle power automatically by asserting DTR", action="store_true")