Skip to content

Commit

Permalink
better definition of pip extras
Browse files Browse the repository at this point in the history
  • Loading branch information
jooste committed May 27, 2022
1 parent 9289f56 commit 5a91bbe
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
recursive-include bluesky/ *
recursive-exclude bluesky/ *.pyc *-checkpoint.py
global-exclude *__pycache__*
recursive-exclude bluesky/ .DS_Store
include LICENSE
include README.md
include setup.py
Expand Down
1 change: 1 addition & 0 deletions requirements-gui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pandas
matplotlib
msgpack
zmq
textual
26 changes: 16 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
[extras]
# For CLI only bluesky environment: pip install bluesky-simulator[headless]
headless =
# already defined in requirements.txt
# For GUI bluesky environment: pip install bluesky-simulator[gui]
gui =
PyQt6
PyQt6-WebEngine
pygame =
pygame
qt5 =
pyopengl
PyQt5
PyQtWebEngine-Qt5
qt6 =
pyopengl
# NOTE: pyopengl-accelerate is awkward to pip install from PyPI
# For accelerated GUI bluesky environment: pip install bluesky-simulator[full]
full =
PyQt6
PyQt6-WebEngine
console =
textual
full =
pygame
pyopengl
PyQt6
PyQt6-WebEngine
textual
# For headless (server-only) bluesky environment: pip install bluesky-simulator[headless]
headless =
# already defined in requirements.txt

12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Always prefer setuptools over distutils
import os
from os import path
from setuptools import setup, find_packages
from codecs import open
import glob
import shutil
import datetime
import configparser

here = path.abspath(path.dirname(__file__))
Expand All @@ -14,6 +11,11 @@
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

# Get base requirements from requirements.txt
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
install_requires = f.readlines()


# get extra requirements from setup.cfg
parser = configparser.ConfigParser()
parser.read('%s/setup.cfg' % here)
Expand All @@ -36,6 +38,8 @@
name='bluesky-simulator', # 'bluesky' package name already taken in PyPI
use_calver=True,
setup_requires=['calver'],
install_requires=install_requires,
extras_require=extras_requirements,
author='The BlueSky community',
license='GNU General Public License v3 (GPLv3)',
maintainer='Jacco Hoekstra and Joost Ellerbroek',
Expand Down Expand Up @@ -64,8 +68,6 @@
# This field adds keywords for your project which will appear on the
keywords='atm transport simulation aviation aircraft',
packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required
install_requires=open(here + '/requirements.txt', 'r').readlines(),
extras_require=extras_requirements,
include_package_data=True,
# package_data={
# 'bluesky.resources': [f for f in glob.glob('data/**/*') if path.isfile(f)] + ['data/default.cfg']
Expand Down

0 comments on commit 5a91bbe

Please sign in to comment.