Skip to content
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
60 changes: 30 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
sudo: false
language: python
conditions: v1
python: 3.6

# There are two accounts made specifically for Travis, and the passwords are really only encrypted for obscurity
# The global env variables `client1_email`, `client1_password`, `client2_email`, `client2_password` and `group_id`
# are set on the Travis Settings page

# The tests are run with `Limit concurrent jobs = 1`, since the tests can't use the clients simultaneously

install:
- pip install -U -r requirements.txt
- pip install -U -r dev-requirements.txt
before_install: pip install flit
# Use `--deps production` so that we don't install unnecessary dependencies
install: flit install --deps production --extras test

cache:
pip: true
Expand All @@ -28,63 +29,62 @@ jobs:
# and in `tests.utils.load_client`, we need 6 new sessions per branch. This is usually the point where Facebook
# starts complaining, and we have to manually fix it

# Run online tests in all the supported python versions
- &test-online
if: (branch = master OR tag IS present) AND type != pull_request
stage: online tests
script: scripts/travis-online

# Run online tests in all the supported python versions
- <<: *test-online
python: 2.7
before_install:
- sudo apt-get -y install python3-pip python3-setuptools
- sudo pip3 install flit
install: flit install --python python --deps production --extras test
- <<: *test-online
python: 3.4
- <<: *test-online
python: 3.5
- <<: *test-online
python: 3.6
- <<: *test-online
python: pypy
python: pypy3.5

# Run the expensive tests, with the python version most likely to break, aka. 2
- <<: *test-online
# Only run if the commit message includes [ci all] or [all ci]
if: commit_message =~ /\[ci\s+all\]|\[all\s+ci\]/
python: 2.7
before_install:
- sudo apt-get -y install python3-pip python3-setuptools
- sudo pip3 install flit
install: flit install --python python --deps production --extras test
env: PYTEST_ADDOPTS='-m expensive'

# Run offline tests in all the supported python versions
- &test-offline
# Ideally, it'd be nice to run the offline tests in every build, but since we can't run jobs concurrently (yet),
# we'll disable them when they're not needed, and include them inside the online tests instead
if: not ((branch = master OR tag IS present) AND type != pull_request)
stage: offline tests
script: scripts/travis-offline

# Run offline tests in all the supported python versions
- <<: *test-offline
python: 2.7
before_install:
- sudo apt-get -y install python3-pip python3-setuptools
- sudo pip3 install flit
install: flit install --python python --deps production --extras test
- <<: *test-offline
python: 3.4
- <<: *test-offline
python: 3.5
- <<: *test-offline
python: 3.6
- <<: *test-offline
python: 3.6
- <<: *test-offline
python: pypy
python: pypy3.5

# Deploy to PyPI
- &deploy
stage: deploy
if: branch = master AND tag IS present
- stage: deploy
name: PyPI
if: tag IS present
install: skip
script: skip
deploy:
provider: pypi
user: madsmtm
password:
secure: "VA0MLSrwIW/T2KjMwjLZCzrLHw8pJT6tAvb48t7qpBdm8x192hax61pz1TaBZoJvlzyBPFKvluftuclTc7yEFwzXe7Gjqgd/ODKZl/wXDr36hQ7BBOLPZujdwmWLvTzMh3eJZlvkgcLCzrvK3j2oW8cM/+FZeVi/5/FhVuJ4ofs="
distributions: sdist bdist_wheel
skip_existing: true

# We need the bdist_wheels from both Python 2 and 3
python: 3.6
- <<: *deploy
python: 2.7
provider: script
script: flit publish
on:
tags: true
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ or jump right into the code by viewing the `examples <https://github.com/carpedm

Installation:

.. code-block:: console
.. code-block::

$ pip install fbchat

You can also install from source, by using `setuptools` (You need at least version 30.3.0):
You can also install from source, by using `flit`:

.. code-block:: console
.. code-block::

$ pip install flit
$ git clone https://github.com/carpedm20/fbchat.git
$ cd fbchat
$ python setup.py install
$ flit install


Maintainer
Expand Down
2 changes: 0 additions & 2 deletions dev-requirements.txt

This file was deleted.

13 changes: 4 additions & 9 deletions fbchat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# -*- coding: UTF-8 -*-
"""Facebook Chat (Messenger) for Python

"""
fbchat
~~~~~~

Facebook Chat (Messenger) for Python

:copyright: (c) 2015 - 2018 by Taehoon Kim
:license: BSD 3-Clause, see LICENSE for more details.
:copyright: (c) 2015 - 2019 by Taehoon Kim
:license: BSD 3-Clause, see LICENSE for more details.
"""

from __future__ import unicode_literals
Expand All @@ -18,7 +13,7 @@
__version__ = '1.5.0'
__description__ = 'Facebook Chat (Messenger) for Python'

__copyright__ = 'Copyright 2015 - 2018 by Taehoon Kim'
__copyright__ = 'Copyright 2015 - 2019 by Taehoon Kim'
__license__ = 'BSD 3-Clause'

__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["flit"]
build-backend = "flit.buildapi"

[tool.flit.metadata]
module = "fbchat"
author = "Taehoon Kim"
author-email = "carpedm20@gmail.com"
maintainer = "Mads Marquart"
maintainer-email = "madsmtm@gmail.com"
home-page = "https://github.com/carpedm20/fbchat/"
requires = [
"aenum",
"requests",
"beautifulsoup4",
]
description-file = "README.rst"
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",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Communications :: Chat",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.0"
keywords = "Facebook FB Messenger Library Chat Api Bot"
license = "BSD 3-Clause"

[tool.flit.metadata.urls]
Documentation = "https://fbchat.readthedocs.io/"
Repository = "https://github.com/carpedm20/fbchat/"

[tool.flit.metadata.requires-extra]
test = [
"pytest~=4.0",
"six",
]
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

48 changes: 0 additions & 48 deletions setup.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions setup.py

This file was deleted.