Skip to content

Commit f4c438d

Browse files
committed
fix version number in tesp_support for PyPI distribution and read the docs
1 parent fb4939f commit f4c438d

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

examples/autotest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ if [[ -z ${INSTDIR} ]]; then
44
. "${HOME}/tespEnv"
55
fi
66

7-
cd "${TESPDIR}" || exit
7+
cd "${TESPDIR}/examples" || exit
88
exec python3 autotest.py &> autotest.log &

src/tesp_support/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include *.cfg
2-
include *.ini
32
include *.rst
3+
include version
44
include LICENSE

src/tesp_support/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Development Work Flow for tesp_support
3636
* When ready, edit the tesp_support version number and dependencies in setup.py
3737
* To deploy follow the instructions in the Python Packaging Guide:
3838
1. Create an account on PyPI if you haven't yet.
39-
2. Create the source distribution and wheels for your package: python setup.py sdist bdist_wheel
40-
3. Install twine (or make sure you have version 2.0 or newer): pip install twine
39+
2. Install twine and build: pip install twine build
40+
3. Create the source distribution, change to tesp_support directory execute: python3 -m build .
4141
4. Check your distribution files for errors: twine check dist/*
4242
5. (Optional) Upload to the PyPI test server first (note: separate user registration required): twine upload --repository-url https://test.pypi.org/legacy/ dist/*
4343
6. Upload to PyPI: twine upload dist/*

src/tesp_support/setup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# Copyright (C) 2017-2022 Battelle Memorial Institute
22
# file: setup.py
33

4-
from os import path
4+
import pathlib
55
from setuptools import setup, find_packages
66

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

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

0 commit comments

Comments
 (0)