Bladeren bron

build: prepare for the distribution

pull/10/head
Jérôme Deuchnord 3 jaren geleden
bovenliggende
commit
aa0fd77a56
5 gewijzigde bestanden met toevoegingen van 52 en 20 verwijderingen
  1. +1
    -1
      .github/workflows/black.yml
  2. +3
    -0
      .gitignore
  3. +6
    -19
      Makefile
  4. +40
    -0
      setup.py
  5. +2
    -0
      tests.py

+ 1
- 1
.github/workflows/black.yml Bestand weergeven

@@ -16,4 +16,4 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: psf/black@stable
- uses: psf/black@20.8b1

+ 3
- 0
.gitignore Bestand weergeven

@@ -1,3 +1,6 @@
__pycache__
.coverage
Pipfile.lock
/build
/dist
/kosmorrolib.egg-info

+ 6
- 19
Makefile Bestand weergeven

@@ -1,7 +1,7 @@
black:
pipenv run black kosmorrolib tests
pipenv run black kosmorrolib tests setup.py

.PHONY: test
.PHONY: tests
tests: legacy-tests doctests

doctests:
@@ -24,25 +24,12 @@ env:
exit 1; \
fi

release: env
@echo -e "\e[1mCreating release with version number \e[36m$$RELEASE_NUMBER\e[0m"
@echo

sed "s/^VERSION =.*/VERSION = '$$RELEASE_NUMBER'/g" kosmorrolib/version.py > version.py
mv version.py kosmorrolib/version.py

pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot > /dev/null

changelog:
conventional-changelog -p angular -i CHANGELOG.md -s
sed "0,/\\[\\]/s/\\[\\]/[v$$RELEASE_NUMBER]/g" CHANGELOG.md > /tmp/CHANGELOG.md
sed -e "s/...v)/...v$$RELEASE_NUMBER)/" /tmp/CHANGELOG.md > CHANGELOG.md
rm /tmp/CHANGELOG.md

@echo
@echo -e "\e[1mRelease \e[36m$$RELEASE_NUMBER\e[39m is ready to commit."
@echo -e "Please review the changes, then invoke \e[33mmake finish-release\e[39m."
@echo -e "\e[32m✔\e[33m Changelog generated. Don't forget to update the version number before committing.\e[0m"
@echo -e " When everything is good, finish the release with 'make tag'."

finish-release: env
tag: env
git add CHANGELOG.md kosmorrolib/version.py kosmorrolib/locales/messages.pot
git commit -m "build: bump version $$RELEASE_NUMBER"
git tag "v$$RELEASE_NUMBER"


+ 40
- 0
setup.py Bestand weergeven

@@ -0,0 +1,40 @@
#!/usr/bin/env python3

import pathlib
from setuptools import setup, find_packages

from kosmorrolib.__version__ import __version__

HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()

setup(
name="kosmorrolib",
version=__version__,
author="Jérôme Deuchnord",
author_email="jerome@deuchnord.fr",
url="http://kosmorro.space",
license="CECILL-C",
description="A library to computes the ephemerides.",
long_description=README,
long_description_content_type="text/markdown",
keywords=["kosmorro", "astronomy", "ephemerides", "ephemeris"],
packages=["kosmorrolib"],
install_requires=[
"skyfield>=1.21.0,<2.0.0",
"numpy>=1.17.0,<2.0.0",
"python-dateutil",
],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"License :: CeCILL-C Free Software License Agreement (CECILL-C)",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Astronomy",
],
python_requires=">=3.7",
)

+ 2
- 0
tests.py Bestand weergeven

@@ -16,3 +16,5 @@ if __name__ == "__main__":

if failures == 0:
print("✔ All %d tests successfully passed." % tests)
else:
exit(1)

Laden…
Annuleren
Opslaan