Skip to content
Snippets Groups Projects
Forked from empyre / empyre
134 commits behind the upstream repository.
  • Jan Caron's avatar
    000db917
    Setup and many smaller things! · 000db917
    Jan Caron authored
    conf.py: uncommented path  finding for sphinx to find docs folder.
    index.rst: Added modules.rst as an overview.
    make.bat, Makefile, pyramid.rst: Deleted!
    utils: put many functions in convenience.py
    environment.py: Added stuff for documentation
    README.md: deleted badges (directly on GitLab now!)
    setup.py: Further streamline!
    000db917
    History
    Setup and many smaller things!
    Jan Caron authored
    conf.py: uncommented path  finding for sphinx to find docs folder.
    index.rst: Added modules.rst as an overview.
    make.bat, Makefile, pyramid.rst: Deleted!
    utils: put many functions in convenience.py
    environment.py: Added stuff for documentation
    README.md: deleted badges (directly on GitLab now!)
    setup.py: Further streamline!
setup.py 1.09 KiB
#!python
# coding=utf-8
"""Setup for testing, building, distributing and installing the 'Pyramid'-package"""

import os
import subprocess
from setuptools import setup, config

# Read version from setup.py:
version = config.read_configuration('setup.cfg')['metadata']['version']
# Get current git revision:
try:
    git_rev = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip().decode()
except Exception:
    git_rev = "???"
# Write both to version.py:
version_string =
with open(os.path.join(os.path.dirname(__file__), 'pyramid', 'version.py'), 'w') as vfile:
    vfile.write('# -*- coding: utf-8 -*-\n' +
                '""""This file was automatically generated by `setup.py`"""\n' +
                f'version = "{version}"\n' +
                f'git_revision = "{git_rev}"\n')
# Run setup (reads metadata & options from setup.cfg):
setup()


# TODO: HOW TO GET JUTIL???

# TODO: Also create conda recipe!
# TODO: Handle extras via metapackage (depends on pyramid-base that holds the core code and extras?)
# TODO: https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/build-pkgs.html