Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve project setup #337

Merged
merged 1 commit into from
Sep 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Contributing
============

#. Clone the repository with ``git clone git@github.com:argaen/aiocache.git``
#. Install dependencies with ``pip install -r requirements-ci.txt && pip install -r requirements-dev.txt``
#. Install dependencies with ``pip install -r requirements-ci.txt``
#. Make a change (means writing code, tests without reducing coverage and docs)
#. Ensure all tests pass with ``make test``. For fast iterations, use ``make ut`` which will build just the unit tests. You will need docker and docker-compose to be able to pass acceptance and functional tests.
#. Ensure documentation is OK with ``sphinx-autobuild docs/ docs/_build/html/``
Expand Down
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ This library aims for simplicity over specialization. All caches contain the sam
Installing
==========

Do ``pip install aiocache``
``pip install aiocache``
``pip install aiocache[redis]``
``pip install aiocache[memcached]``
``pip install aiocache[redis,memcached]``


Usage
Expand Down
12 changes: 4 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ Welcome to aiocache's documentation!
Installing
----------

``pip install aiocache``

If you don't need redis or memcached support, you can install as follows:

.. code-block:: python

AIOCACHE_REDIS=no pip install aiocache # Don't install redis client (aioredis)
AIOCACHE_MEMCACHED=no pip install aiocache # Don't install memcached client (aiomcache)
``pip install aiocache`` # Memory only
``pip install aiocache[redis]`` # Redis and Memory
``pip install aiocache[memcached]`` # Memcached and Memory
``pip install aiocache[redis,memcached]`` # All backends


Usage
Expand Down
3 changes: 1 addition & 2 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r requirements.txt
-e .
-e .[redis,memcached]

flake8==3.4.1
mypy==0.521
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

52 changes: 19 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os

from setuptools import setup, find_packages
from distutils.util import strtobool

with open(
os.path.join(
Expand All @@ -15,36 +14,23 @@
raise RuntimeError('Unable to determine version.')


aioredis = "aioredis>=0.3.3,<1"
aiomcache = "aiomcache>=0.5.2"

install_requires = set((aioredis, aiomcache))

setup_kwargs = {
'name': "aiocache",
'version': version,
'author': "Manuel Miranda",
'url': "https://github.com/argaen/aiocache",
'author_email': "manu.mirandad@gmail.com",
'description': "multi backend asyncio cache",
'classifiers': [
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Framework :: AsyncIO",
setup(
name='aiocache',
version=version,
author='Manuel Miranda',
url='https://github.com/argaen/aiocache',
author_email='manu.mirandad@gmail.com',
description='multi backend asyncio cache',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Framework :: AsyncIO',
],
'packages': find_packages(),
}


if not strtobool(os.environ.get("AIOCACHE_REDIS", "yes")):
print("Installing without aioredis")
install_requires.remove(aioredis)

if not strtobool(os.environ.get("AIOCACHE_MEMCACHED", "yes")):
print("Installing without aiomcache")
install_requires.remove(aiomcache)


setup_kwargs['install_requires'] = install_requires
setup(**setup_kwargs)
packages=find_packages(),
install_requires=None,
extras_require={
'redis': ['aioredis>=0.3.3,<1'],
'memcached': ['aiomcache>=0.5.2']
}
)