mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-04-05 07:15:38 -04:00
Hide private symbols in Python package.
I realized that the way I structured the pip package in version 2.0.15 made the private symbols (those whose names begin with an underscore) to be visible by the importer. I reworked the package structure so this no longer happens. This is now fixed in: https://pypi.org/project/astronomy-engine/2.0.16/
This commit is contained in:
1
source/python/.gitignore
vendored
1
source/python/.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
*.pyc
|
||||
astronomy_engine.egg-info/
|
||||
dist/
|
||||
astronomy/__init__.py
|
||||
|
||||
1
source/python/astronomy/.gitignore
vendored
Normal file
1
source/python/astronomy/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
astronomy.py
|
||||
7
source/python/astronomy/__init__.py
Normal file
7
source/python/astronomy/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# Astronomy Engine module initializer by Don Cross <cosinekitty@gmail.com>.
|
||||
|
||||
# Pull Astronomy Engine's public symbols into module scope.
|
||||
from .astronomy import *
|
||||
|
||||
# Delete the redundant nested module namespace.
|
||||
del astronomy
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
mkdir -pv astronomy || exit $?
|
||||
rm -f dist/* astronomy/*
|
||||
cp -v astronomy.py astronomy/__init__.py || exit $?
|
||||
rm -f dist/*
|
||||
cp -v astronomy.py astronomy/astronomy.py || exit $?
|
||||
python3 -m build || exit $?
|
||||
python3 -m twine upload --repository astronomy-engine dist/* || exit $?
|
||||
exit 0
|
||||
|
||||
@@ -2,7 +2,7 @@ from setuptools import setup
|
||||
|
||||
setup(
|
||||
name='astronomy-engine',
|
||||
version='2.0.15',
|
||||
version='2.0.16',
|
||||
description='Astronomy calculation for Sun, Moon, and planets.',
|
||||
long_description=open('README.md').read(),
|
||||
long_description_content_type='text/markdown',
|
||||
|
||||
Reference in New Issue
Block a user