From 2a92ad70c08db9f5aa8a4fb284d7980462eb7104 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sun, 20 Mar 2022 13:42:16 -0400 Subject: [PATCH] Fixed pip package. Added SiderealTime to pip, npm. The pip package was broken! I violated ancient software development wisdom: "If you haven't tested it, it doesn't work." It is now working in: https://pypi.org/project/astronomy-engine/2.0.15/ Version 2.0.15 of Astronomy Engine for Python (pip) and Node.js (npm) add support for the new SiderealTime function. This was previously an internal function, but now it is exposed for outside callers. --- generate/makedoc | 4 ++-- source/js/package.json | 2 +- source/python/.gitignore | 1 + source/python/publish | 4 +++- source/python/setup.py | 5 +++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/generate/makedoc b/generate/makedoc index a9b606be..7674c7c3 100755 --- a/generate/makedoc +++ b/generate/makedoc @@ -7,7 +7,7 @@ Fail() echo "Trimming trailing whitespace in source code." for file in template/astronomy.{c,cs,ts,py} ../source/c/astronomy.h; do - node trimspace.js ${file} || Fail "Cannot trim whitespace from file: ${file}" + node trimspace.js ${file} || Fail "Cannot trim whitespace from template file: ${file}" done echo "Generating target code." @@ -15,7 +15,7 @@ echo "Generating target code." echo "Trimming trailing whitespace in target code." for file in ../source/c/astronomy.c ../source/js/astronomy.ts ../source/python/astronomy.py ../source/csharp/astronomy.cs; do - node trimspace.js ${file} + node trimspace.js ${file} || Fail "Cannot trim whitespace from target file: ${file}" done # C# is a special case: we have to compile the code to get its documentation. diff --git a/source/js/package.json b/source/js/package.json index d5ce8c90..b28cb263 100644 --- a/source/js/package.json +++ b/source/js/package.json @@ -1,6 +1,6 @@ { "name": "astronomy-engine", - "version": "2.0.13", + "version": "2.0.15", "description": "Astronomy calculation for Sun, Moon, and planets.", "main": "./astronomy.js", "module": "./esm/astronomy.js", diff --git a/source/python/.gitignore b/source/python/.gitignore index fb6f6f4d..6e03b6d3 100644 --- a/source/python/.gitignore +++ b/source/python/.gitignore @@ -1,3 +1,4 @@ *.pyc astronomy_engine.egg-info/ dist/ +astronomy/__init__.py diff --git a/source/python/publish b/source/python/publish index 08a79732..bbfceac4 100755 --- a/source/python/publish +++ b/source/python/publish @@ -1,5 +1,7 @@ #!/bin/bash -rm -f dist/* +mkdir -pv astronomy || exit $? +rm -f dist/* astronomy/* +cp -v astronomy.py astronomy/__init__.py || exit $? python3 -m build || exit $? python3 -m twine upload --repository astronomy-engine dist/* || exit $? exit 0 diff --git a/source/python/setup.py b/source/python/setup.py index 2635f922..af7bf3e6 100644 --- a/source/python/setup.py +++ b/source/python/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='astronomy-engine', - version='2.0.13', + version='2.0.15', description='Astronomy calculation for Sun, Moon, and planets.', long_description=open('README.md').read(), long_description_content_type='text/markdown', @@ -14,5 +14,6 @@ setup( "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7" - ] + ], + packages = ['astronomy'] )