Updated setup.py
and requirements, now we use setup.cfg
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,9 +8,11 @@
|
|||||||
# Packages
|
# Packages
|
||||||
*.egg
|
*.egg
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
*.dist-info
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
eggs
|
eggs
|
||||||
|
.eggs
|
||||||
parts
|
parts
|
||||||
bin
|
bin
|
||||||
var
|
var
|
||||||
|
@@ -17,6 +17,10 @@ env:
|
|||||||
- secure: "V7RB3go2Tc/DdW1x9DkMI+vCfnOgiS3ygmFCABs/GjfPZjZL7VLMJgYGlx0cjeeeN+Oxa2GrhczRAKeMdGB6Ss2lGGAVs6cjJ56ODuBHWT6/FNzLjtDkTnjD+Kfh0l8ZOdxTF3MQ6M/9hU6z5ek+XYGr7u+/7wOYZ5L2cK5MaQ0=" # client2_password
|
- secure: "V7RB3go2Tc/DdW1x9DkMI+vCfnOgiS3ygmFCABs/GjfPZjZL7VLMJgYGlx0cjeeeN+Oxa2GrhczRAKeMdGB6Ss2lGGAVs6cjJ56ODuBHWT6/FNzLjtDkTnjD+Kfh0l8ZOdxTF3MQ6M/9hU6z5ek+XYGr7u+/7wOYZ5L2cK5MaQ0=" # client2_password
|
||||||
- group_id=1463789480385605
|
- group_id=1463789480385605
|
||||||
|
|
||||||
|
install:
|
||||||
|
- pip install -U -r requirements.txt
|
||||||
|
- pip install -U -r dev-requirements.txt
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- if [[ "$TRAVIS_PYTHON_VERSION" = "2.7" ]]; then export PYTEST_ADDOPTS='-m ""'; fi; # expensive tests (otherwise disabled in pytest.ini)
|
- if [[ "$TRAVIS_PYTHON_VERSION" = "2.7" ]]; then export PYTEST_ADDOPTS='-m ""'; fi; # expensive tests (otherwise disabled in pytest.ini)
|
||||||
- if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then export PYTEST_ADDOPTS='-m offline'; fi; # offline tests only
|
- if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then export PYTEST_ADDOPTS='-m offline'; fi; # offline tests only
|
||||||
@@ -33,7 +37,7 @@ deploy:
|
|||||||
user: madsmtm
|
user: madsmtm
|
||||||
password:
|
password:
|
||||||
secure: "VA0MLSrwIW/T2KjMwjLZCzrLHw8pJT6tAvb48t7qpBdm8x192hax61pz1TaBZoJvlzyBPFKvluftuclTc7yEFwzXe7Gjqgd/ODKZl/wXDr36hQ7BBOLPZujdwmWLvTzMh3eJZlvkgcLCzrvK3j2oW8cM/+FZeVi/5/FhVuJ4ofs="
|
secure: "VA0MLSrwIW/T2KjMwjLZCzrLHw8pJT6tAvb48t7qpBdm8x192hax61pz1TaBZoJvlzyBPFKvluftuclTc7yEFwzXe7Gjqgd/ODKZl/wXDr36hQ7BBOLPZujdwmWLvTzMh3eJZlvkgcLCzrvK3j2oW8cM/+FZeVi/5/FhVuJ4ofs="
|
||||||
|
distributions: sdist bdist_wheel
|
||||||
on:
|
on:
|
||||||
python: 3.6
|
|
||||||
branch: master
|
branch: master
|
||||||
tags: true
|
tags: true
|
||||||
|
@@ -1,4 +1,2 @@
|
|||||||
include LICENSE.txt
|
include LICENSE.txt
|
||||||
include MANIFEST.in
|
|
||||||
include README.rst
|
include README.rst
|
||||||
include setup.py
|
|
||||||
|
@@ -31,6 +31,15 @@ Installation:
|
|||||||
|
|
||||||
$ pip install fbchat
|
$ pip install fbchat
|
||||||
|
|
||||||
|
You can also install from source, by using `setuptools` (You need at least version 30.3.0):
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ git clone https://github.com/carpedm20/fbchat.git
|
||||||
|
$ cd fbchat
|
||||||
|
$ python setup.py install
|
||||||
|
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
2
dev-requirements.txt
Normal file
2
dev-requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pytest
|
||||||
|
six
|
@@ -1,28 +1,28 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
from datetime import datetime
|
|
||||||
from .client import *
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
fbchat
|
fbchat
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
Facebook Chat (Messenger) for Python
|
Facebook Chat (Messenger) for Python
|
||||||
|
|
||||||
:copyright: (c) 2015 by Taehoon Kim.
|
:copyright: (c) 2015 - 2018 by Taehoon Kim
|
||||||
:license: BSD, see LICENSE for more details.
|
:license: BSD, see LICENSE for more details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__copyright__ = 'Copyright 2015 - {} by Taehoon Kim'.format(datetime.now().year)
|
from .client import *
|
||||||
|
|
||||||
|
__title__ = 'fbchat'
|
||||||
__version__ = '1.3.8'
|
__version__ = '1.3.8'
|
||||||
|
__description__ = 'Facebook Chat (Messenger) for Python'
|
||||||
|
|
||||||
|
__copyright__ = 'Copyright 2015 - 2018 by Taehoon Kim'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
|
|
||||||
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
|
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
|
||||||
__email__ = 'carpedm20@gmail.com'
|
__email__ = 'carpedm20@gmail.com'
|
||||||
__source__ = 'https://github.com/carpedm20/fbchat/'
|
|
||||||
__description__ = 'Facebook Chat (Messenger) for Python'
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'Client',
|
'Client',
|
||||||
|
@@ -2,4 +2,3 @@ requests
|
|||||||
lxml
|
lxml
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
enum34; python_version < '3.4'
|
enum34; python_version < '3.4'
|
||||||
six
|
|
||||||
|
52
setup.cfg
Normal file
52
setup.cfg
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
[metadata]
|
||||||
|
name = fbchat
|
||||||
|
version = attr: fbchat.__version__
|
||||||
|
license = BSD
|
||||||
|
license_file = LICENSE.txt
|
||||||
|
|
||||||
|
author = Taehoon Kim
|
||||||
|
author_email = carpedm20@gmail.com
|
||||||
|
maintainer = Mads Marquart
|
||||||
|
maintainer_email = madsmtm@gmail.com
|
||||||
|
|
||||||
|
description = Facebook Chat (Messenger) for Python
|
||||||
|
long_description = file: README.rst
|
||||||
|
long_description_content_type = text/x-rst
|
||||||
|
|
||||||
|
keywords = Facebook FB Messenger Chat Api Bot
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 3 - Alpha
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: Information Technology
|
||||||
|
License :: OSI Approved :: BSD License
|
||||||
|
Operating System :: OS Independent
|
||||||
|
Natural Language :: English
|
||||||
|
Programming Language :: Python
|
||||||
|
Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 3.4
|
||||||
|
Programming Language :: Python :: 3.5
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Programming Language :: Python :: Implementation :: PyPy
|
||||||
|
Topic :: Communications :: Chat
|
||||||
|
Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
||||||
|
Topic :: Software Development :: Libraries :: Python Modules
|
||||||
|
|
||||||
|
url = https://github.com/carpedm20/fbchat/
|
||||||
|
project_urls =
|
||||||
|
Documentation = https://fbchat.readthedocs.io/
|
||||||
|
Repository = https://github.com/carpedm20/fbchat/
|
||||||
|
|
||||||
|
[options]
|
||||||
|
zip_safe = True
|
||||||
|
include_package_data = True
|
||||||
|
packages = find:
|
||||||
|
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.0
|
||||||
|
install_requires =
|
||||||
|
requests
|
||||||
|
lxml
|
||||||
|
beautifulsoup4
|
||||||
|
# May not work in pip with bdist_wheel
|
||||||
|
# See https://wheel.readthedocs.io/en/latest/#defining-conditional-dependencies
|
||||||
|
# It is therefore defined in setup.py
|
||||||
|
# enum34; python_version < '3.4'
|
80
setup.py
Normal file → Executable file
80
setup.py
Normal file → Executable file
@@ -1,82 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
"""
|
|
||||||
Setup script for fbchat
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
try:
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
except ImportError:
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
with open('README.rst') as f:
|
setup(extras_require={':python_version < "3.4"': ['enum34']})
|
||||||
readme_content = f.read().strip()
|
|
||||||
|
|
||||||
requirements = [
|
|
||||||
'requests',
|
|
||||||
'lxml',
|
|
||||||
'beautifulsoup4'
|
|
||||||
]
|
|
||||||
|
|
||||||
extras_requirements = {
|
|
||||||
':python_version < "3.4"': ['enum34']
|
|
||||||
}
|
|
||||||
|
|
||||||
version = None
|
|
||||||
author = None
|
|
||||||
email = None
|
|
||||||
source = None
|
|
||||||
description = None
|
|
||||||
with open(os.path.join('fbchat', '__init__.py')) as f:
|
|
||||||
for line in f:
|
|
||||||
if line.strip().startswith('__version__'):
|
|
||||||
version = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
|
||||||
elif line.strip().startswith('__author__'):
|
|
||||||
author = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
|
||||||
elif line.strip().startswith('__email__'):
|
|
||||||
email = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
|
||||||
elif line.strip().startswith('__source__'):
|
|
||||||
source = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
|
||||||
elif line.strip().startswith('__description__'):
|
|
||||||
description = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
|
||||||
elif None not in (version, author, email, source, description):
|
|
||||||
break
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='fbchat',
|
|
||||||
author=author,
|
|
||||||
author_email=email,
|
|
||||||
license='BSD License',
|
|
||||||
keywords=["facebook chat fbchat"],
|
|
||||||
description=description,
|
|
||||||
long_description=readme_content,
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'Intended Audience :: Information Technology',
|
|
||||||
'License :: OSI Approved :: BSD License',
|
|
||||||
'Operating System :: OS Independent',
|
|
||||||
'Programming Language :: Python :: 2.6',
|
|
||||||
'Programming Language :: Python :: 2.7',
|
|
||||||
'Programming Language :: Python :: 2.7',
|
|
||||||
'Programming Language :: Python :: 3.2',
|
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.4',
|
|
||||||
'Programming Language :: Python :: 3.5',
|
|
||||||
'Programming Language :: Python :: Implementation :: CPython',
|
|
||||||
'Programming Language :: Python :: Implementation :: PyPy',
|
|
||||||
'Programming Language :: Python',
|
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
||||||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
|
||||||
'Topic :: Communications :: Chat',
|
|
||||||
],
|
|
||||||
include_package_data=True,
|
|
||||||
packages=['fbchat'],
|
|
||||||
install_requires=requirements,
|
|
||||||
extras_require=extras_requirements,
|
|
||||||
url=source,
|
|
||||||
version=version,
|
|
||||||
zip_safe=True,
|
|
||||||
)
|
|
||||||
|
Reference in New Issue
Block a user