Skip to content

Commit

Permalink
Added support for wheel distribution package
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Aug 1, 2017
1 parent 41309d0 commit 514eaae
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ deploy:
tags: true
password:
secure: q0ey31cWljGB30l43aEd1KIPuAHRutzmsd2lBb/2zvD79ReBrzvCdFAkH2xcyo4Volk3aazQQTNUIurnTuvBxmtqja0e+gUaO5LdOcokVdOGyLABXh7qhd2kdvbTDWgSwA4EWneLGXn/SjXSe0f3pCcrwc6WDcLAHxtffMvO9gulpYQtUoOqXfMipMOkRD9iDWTJBsSo3trL70X1FHOVr6Yqi0mfkX2Y/imxn6wlTWRz28Ru94xrj27OmUnCv7qcG0taO8LNlUCquNFAr2sZ+l+U/GkQrrM1y+ehPz3pmI0cCCd7SX/7+EG9ViZ07BZ31nk4pgnqjmj3nFwqnCE/4IApGnduqtrMDF63C9TnB1TU8oJmbbUCu4ODwRpBPZMnwzaHsLnrpdrB89/98NtTfujdrh3U5bVB+t33yxrXVh+FjgLYj9PVeDixpFDn6V/Xcnv4BbRMNOhXIQT7a7/5b99RiXBjCk6KRu+Jdu5DZ+3G4Nbr4oim3kZFPUHa555qbzTlwAfkrQxKv3C3OdVJR7eGc9ADsbHyEJbdPNAh/T+xblXTXLS3hPYDvgM+WEGy3CytBDG3JVcXm25ZP96EDWjweJ7MyfylubhuKj/iR1Y1wiHeIsYq9CqRrFQUWL8gFJBfmgjs96xRXXXnvyLtKUKpKw3wFg5cR/6FnLeYZ8k=
distributions: "sdist bdist_wheel"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Please read [UPGRADE-v1.0.md](https://github.com/graphql-python/graphene/blob/master/UPGRADE-v1.0.md)
to learn how to upgrade to Graphene `1.0`.
Please read [UPGRADE-v2.0.md](https://github.com/graphql-python/graphene/blob/master/UPGRADE-v2.0.md)
to learn how to upgrade to Graphene `2.0`.

---

Expand All @@ -13,7 +13,7 @@ A [SQLAlchemy](http://www.sqlalchemy.org/) integration for [Graphene](http://gra
For instaling graphene, just run this command in your shell

```bash
pip install "graphene-sqlalchemy>=1.0"
pip install "graphene-sqlalchemy>=2.0"
```

## Examples
Expand Down Expand Up @@ -47,8 +47,8 @@ class User(SQLAlchemyObjectType):
class Query(graphene.ObjectType):
users = graphene.List(User)

def resolve_users(self, args, context, info):
query = User.get_query(context) # SQLAlchemy query
def resolve_users(self, info):
query = User.get_query(info.context) # SQLAlchemy query
return query.all()

schema = graphene.Schema(query=Query)
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Please read
`UPGRADE-v1.0.md <https://github.com/graphql-python/graphene/blob/master/UPGRADE-v1.0.md>`__
to learn how to upgrade to Graphene ``1.0``.
`UPGRADE-v2.0.md <https://github.com/graphql-python/graphene/blob/master/UPGRADE-v2.0.md>`__
to learn how to upgrade to Graphene ``2.0``.

--------------

Expand All @@ -17,7 +17,7 @@ For instaling graphene, just run this command in your shell

.. code:: bash
pip install "graphene-sqlalchemy>=1.0"
pip install "graphene-sqlalchemy>=2.0"
Examples
--------
Expand Down Expand Up @@ -53,8 +53,8 @@ following:
class Query(graphene.ObjectType):
users = graphene.List(User)
def resolve_users(self, args, context, info):
query = User.get_query(context) # SQLAlchemy query
def resolve_users(self, info):
query = User.get_query(info.context) # SQLAlchemy query
return query.all()
schema = graphene.Schema(query=Query)
Expand Down
13 changes: 9 additions & 4 deletions graphene_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
get_session
)

__all__ = ['SQLAlchemyObjectType',
'SQLAlchemyConnectionField',
'get_query',
'get_session']
__version__ = '2.0.dev2017072601'

__all__ = [
'__version__',
'SQLAlchemyObjectType',
'SQLAlchemyConnectionField',
'get_query',
'get_session'
]
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ norecursedirs =
filterwarnings =
error
ignore::DeprecationWarning

[bdist_wheel]
universal=1
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
from setuptools import find_packages, setup
import sys
import ast
import re

_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('graphene_django/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))


setup(
name='graphene-sqlalchemy',
version='2.0.dev2017072601',
version=version,

description='Graphene SQLAlchemy integration',
long_description=open('README.rst').read(),
Expand Down

0 comments on commit 514eaae

Please sign in to comment.