Skip to content

Commit

Permalink
Use extras_require for optional dependencies.
Browse files Browse the repository at this point in the history
Close #73 .
  • Loading branch information
pyx committed Jun 26, 2018
1 parent d6b92a8 commit 911bdb1
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
import os
from setuptools import setup, Extension, find_packages

# Uvloop and ujson are notoriously problematic at Windows so they are skipped for Windows users.
# They still can install and benefit from it... it's just that Vibora doesnt make it mandatory.
dependencies = ['pendulum']
if platform.system().lower() == 'linux':
if os.environ.get('VIBORA_UVLOOP', 1) != '0':
dependencies.append('uvloop')
if os.environ.get('VIBORA_UJSON', 1) != '0':
dependencies.append('ujson')

# Loading version
here = pathlib.Path(__file__).parent
Expand All @@ -35,7 +27,20 @@
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6'
],
install_requires=dependencies,
install_requires=['pendulum'],
extras_require={
'dev': [
'flake8',
'pytest',
'tox',
],
'ujson': [
'ujson',
],
'uvloop': [
'uvloop',
],
},
ext_modules=[
Extension(
"vibora.parsers.parser",
Expand Down

0 comments on commit 911bdb1

Please sign in to comment.