Skip to content

Commit

Permalink
fix version number in tesp_support for PyPI distribution and read the…
Browse files Browse the repository at this point in the history
… docs
  • Loading branch information
d3j331 committed Dec 1, 2022
1 parent fb4939f commit f4c438d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ if [[ -z ${INSTDIR} ]]; then
. "${HOME}/tespEnv"
fi

cd "${TESPDIR}" || exit
cd "${TESPDIR}/examples" || exit
exec python3 autotest.py &> autotest.log &
2 changes: 1 addition & 1 deletion src/tesp_support/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include *.cfg
include *.ini
include *.rst
include version
include LICENSE
4 changes: 2 additions & 2 deletions src/tesp_support/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Development Work Flow for tesp_support
* When ready, edit the tesp_support version number and dependencies in setup.py
* To deploy follow the instructions in the Python Packaging Guide:
1. Create an account on PyPI if you haven't yet.
2. Create the source distribution and wheels for your package: python setup.py sdist bdist_wheel
3. Install twine (or make sure you have version 2.0 or newer): pip install twine
2. Install twine and build: pip install twine build
3. Create the source distribution, change to tesp_support directory execute: python3 -m build .
4. Check your distribution files for errors: twine check dist/*
5. (Optional) Upload to the PyPI test server first (note: separate user registration required): twine upload --repository-url https://test.pypi.org/legacy/ dist/*
6. Upload to PyPI: twine upload dist/*
Expand Down
11 changes: 5 additions & 6 deletions src/tesp_support/setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Copyright (C) 2017-2022 Battelle Memorial Institute
# file: setup.py

from os import path
import pathlib
from setuptools import setup, find_packages

file = path.expandvars('$TESPDIR/src/tesp_support/version')
version = open("version", 'r').readline().strip()
long_description = '\n\n'.join(open(f, 'rb').read().decode('utf-8') for f in ['README.rst', 'CHANGELOG.rst'])

setup(
name='tesp_support',
version=open(file, 'r').readline().strip(),
version=version,
author='Trevor Hardy',
author_email='trevor.hardy@PNNL.gov',
description='Python support for the Transactive Energy Simulation Platform',
long_description='\n\n'.join(
open(f, 'rb').read().decode('utf-8')
for f in ['README.rst', 'CHANGELOG.rst']),
long_description=long_description,
long_description_content_type="text/x-rst",
url='https://github.com/pnnl/tesp',
license='BSD',
Expand Down

0 comments on commit f4c438d

Please sign in to comment.