Skip to content

Commit

Permalink
Merge pull request #218 from PyFeeds/dev/pip
Browse files Browse the repository at this point in the history
Prepare for PyPi release
  • Loading branch information
Lukas0907 committed May 15, 2020
2 parents a73a6e0 + bc4b467 commit fc23b1f
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 42 deletions.
13 changes: 12 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
[settings]
known_first_party = feeds
known_third_party = pytest
known_third_party =
click
dateparser
dateutil
feedparser
inline_requests
lxml
pytest
readability
scrapy
twisted
w3lib
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
Expand Down
59 changes: 38 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Feeds
=====

|build-status| |docs|
|pypi| |support| |licence|

|readthedocs|

|travis|

Once upon a time every website offered an RSS feed to keep readers updated
about new articles/blog posts via the users' feed readers. These times are
Expand Down Expand Up @@ -50,21 +54,24 @@ Installation
------------

Feeds is meant to be installed on your server and run periodically in a cron
job or similar job scheduler.
job or similar job scheduler. We recommend to install Feeds inside a virtual
environment.

Feeds can be installed from PyPI using ``pip``:

.. code-block:: bash
pip install PyFeeds
You may also install the current development version:

The easiest way to install Feeds is via ``pip`` in a virtual environment. Feeds
does not provide any releases yet, so one might directly install the current
master branch::
.. code-block:: bash
$ git clone https://github.com/pyfeeds/pyfeeds.git
$ cd feeds
$ python3 -m venv venv
$ source bin/activate
$ pip install -e .
$ pip install https://github.com/pyfeeds/pyfeeds/archive/master.tar.gz
After installation ``feeds`` is available in your virtual environment.

Feeds supports Python 3.5+.
Feeds supports Python 3.6+.

Quickstart
----------
Expand Down Expand Up @@ -140,9 +147,9 @@ Feeds is written and maintained by `Florian Preinstorfer
License
-------

AGPL3, see `LICENSE`_ for details.
AGPL3, see `LICENSEFILE`_ for details.

.. _LICENSE: LICENSE
.. _LICENSEFILE: LICENSE
.. _issue tracker: https://github.com/pyfeeds/pyfeeds/issues
.. _new issue: https://github.com/pyfeeds/pyfeeds/issues/new
.. _Scrapy: https://www.scrapy.org
Expand All @@ -152,12 +159,22 @@ AGPL3, see `LICENSE`_ for details.
.. _Oberösterreichische Nachrichten: https://pyfeeds.readthedocs.io/en/latest/spiders/nachrichten.at.html
.. _Übermedien: https://pyfeeds.readthedocs.io/en/latest/spiders/uebermedien.de.html

.. |build-status| image:: https://travis-ci.org/PyFeeds/PyFeeds.svg?branch=master
:alt: build status
:scale: 100%
:target: https://travis-ci.org/PyFeeds/PyFeeds
.. |pypi| image:: https://img.shields.io/pypi/v/pyfeeds.svg?style=flat-square
:target: https://pypi.org/project/pyfeeds/
:alt: pypi version

.. |support| image:: https://img.shields.io/pypi/pyversions/pyfeeds.svg?style=flat-square
:target: https://pypi.org/project/pyfeeds/
:alt: supported Python version

.. |licence| image:: https://img.shields.io/pypi/l/pyfeeds.svg?style=flat-square
:target: https://pypi.org/project/pyfeeds/
:alt: licence

.. |docs| image:: https://readthedocs.org/projects/pyfeeds/badge/?version=latest
:alt: documentation status
:scale: 100%
:target: https://pyfeeds.readthedocs.io/en/latest/?badge=latest
.. |readthedocs| image:: https://img.shields.io/readthedocs/pyfeeds/latest.svg?style=flat-square&label=Read%20the%20Docs
:alt: Read the documentation at https://pyfeeds.readthedocs.io/en/latest/
:target: https://pyfeeds.readthedocs.io/en/latest/

.. |travis| image:: https://img.shields.io/travis/pyfeeds/pyfeeds/master.svg?style=flat-square&label=Travis%20Build
:target: https://travis-ci.org/PyFeeds/PyFeeds
:alt: travis build status
19 changes: 10 additions & 9 deletions docs/get.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Get Feeds
=========
Feeds is meant to be installed on your server and run periodically in a cron
job or similar job scheduler.
job or similar job scheduler. We recommend to install Feeds inside a virtual
environment.

The easiest way to install Feeds is via ``pip`` in a virtual environment. Feeds
does not provide any releases yet, so one might directly install the current
master branch:
Feeds can be installed from PyPI using ``pip``:

.. code-block:: bash
$ git clone https://github.com/pyfeeds/pyfeeds.git
$ cd feeds
$ python3 -m venv venv
$ source bin/activate
$ pip install -e .
pip install PyFeeds
You may also install the current development version:

.. code-block:: bash
$ pip install https://github.com/pyfeeds/pyfeeds/archive/master.tar.gz
After installation ``feeds`` is available in your virtual environment.

Expand Down
4 changes: 3 additions & 1 deletion feeds/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def cli(ctx, loglevel, config, pdb):
"""
if pdb:
failure.startDebugMode()
os.chdir(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))

# A pip-installed Feeds does not have a scrapy.cfg in its project root.
os.environ["SCRAPY_SETTINGS_MODULE"] = "feeds.default_settings"

settings = load_feeds_settings(config)
settings.set("LOG_LEVEL", loglevel.upper())
Expand Down
14 changes: 7 additions & 7 deletions scripts/new-release
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ set -e
set -u

# Version information.
FEEDS_VERSION="2018.7.30"
FEEDS_YEAR="$(date +%Y)"
VERSION="${1}"
YEAR="$(date +%Y)"

update_docs() {
local conffile="docs/conf.py"

# Version and year
sed -i -E "/^version = /s/\".*\"/\"$FEEDS_VERSION\"/" "$conffile"
sed -i -E "/^release = /s/\".*\"/\"$FEEDS_VERSION\"/" "$conffile"
sed -i -E "/^copyright = /s/[0-9]{4}/$FEEDS_YEAR/" "$conffile"
sed -i -E "/^version = /s/\".*\"/\"${VERSION}\"/" "${conffile}"
sed -i -E "/^release = /s/\".*\"/\"${VERSION}\"/" "${conffile}"
sed -i -E "/^copyright = /s/[0-9]{4}/${YEAR}/" "${conffile}"
}

update_setup() {
local conffile="setup.py"

sed -i -E "/version=/s/\".*\"/\"$FEEDS_VERSION\"/" "$conffile"
sed -i -E "/version=/s/\".*\"/\"${VERSION}\"/" "${conffile}"
}

update_init() {
local conffile="feeds/__init__.py"

sed -i -E "/^__version__ = /s/\".*\"/\"$FEEDS_VERSION\"/" "$conffile"
sed -i -E "/^__version__ = /s/\".*\"/\"${VERSION}\"/" "${conffile}"
}

main() {
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from setuptools import find_packages, setup

with open("README.rst") as f:
long_description = f.read()

setup(
name="feeds",
name="PyFeeds",
version="2018.7.30",
# Author details
description="DIY Atom feeds in times of social media and paywalls",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Florian Preinstorfer, Lukas Anzinger",
author_email="florian@nblock.org, lukas@lukasanzinger.at",
url="https://github.com/nblock/feeds",
url="https://github.com/PyFeeds/PyFeeds",
packages=find_packages(),
include_package_data=True,
install_requires=[
Expand Down

0 comments on commit fc23b1f

Please sign in to comment.