diff --git a/PKGBUILD b/PKGBUILD
index cad1ad1c1c91f1a179141504b8ef25787cb0e509..2d63bd25dac1835a3cfbcda3b44db25db0c4b9b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,39 +5,45 @@ pkgname=('python-commonmark' 'python2-commonmark')
 pkgver=0.8.0
 pkgrel=1
 pkgdesc='Python parser for the CommonMark Markdown spec'
-url='https://pypi.python.org/pypi/CommonMark'
+url='https://pypi.org/project/commonmark/'
 arch=('any')
 license=('BSD')
 makedepends=('python-setuptools' 'python-docutils' 'python-future' 'python-sphinx'
-             'python2-setuptools' 'python2-docutils' 'python2-future' 'python2-sphinx')
+             'python2-setuptools' 'python2-docutils' 'python2-future' 'python2-sphinx'
+             'python-sphinx_rtd_theme' 'python2-sphinx_rtd_theme')
 checkdepends=('python-hypothesis' 'python2-hypothesis')
 options=('!makeflags')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/rtfd/CommonMark-py/archive/${pkgver}.tar.gz)
-sha256sums=('b52fe76749ad856cd52be67e35b548143e7d49d02faef288cf0abf2ee59dabec')
-sha512sums=('fcb70913ec2a8693fc667e18c1600a90d6fa26d9516a9cffd2a3d7a7c2bce2167d65d2ecd0940b4d8933b833f1ed6620bc59fd7bc2ae198365043119dced9da3')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/readthedocs/commonmark.py/archive/${pkgver}.tar.gz
+        python-3.8.patch)
+sha256sums=('b52fe76749ad856cd52be67e35b548143e7d49d02faef288cf0abf2ee59dabec'
+            'f5cd2dc52eee3a6d856b615910d85d031b6c9f5f7e80e28479d589d46a289a5e')
+sha512sums=('fcb70913ec2a8693fc667e18c1600a90d6fa26d9516a9cffd2a3d7a7c2bce2167d65d2ecd0940b4d8933b833f1ed6620bc59fd7bc2ae198365043119dced9da3'
+            '82a839293cc8e3ac1394f091f7441f0320e3ea9414edb40f6f794947b360a379743d767b24e02284f8e7eb3a0635fa9179945242e7aa2f2e18bdffde80e160ee')
 
 prepare() {
-  cp -r CommonMark-py-${pkgver}{,-py2}
+  cp -r commonmark.py-${pkgver}{,-py2}
+
+  patch -Np1 -d commonmark.py-${pkgver} <python-3.8.patch
 }
 
 build() {
-  (cd CommonMark-py-${pkgver}
+  (cd commonmark.py-${pkgver}
     python setup.py build
     make -C docs man text SPHINXBUILD=sphinx-build
   )
-  (cd CommonMark-py-${pkgver}-py2
+  (cd commonmark.py-${pkgver}-py2
     python2 setup.py build
     make -C docs man text SPHINXBUILD=sphinx-build2
   )
 }
 
 check() {
-  (cd CommonMark-py-${pkgver}
+  (cd commonmark.py-${pkgver}
     export PYTHONPATH=.
     python CommonMark/tests/unit_tests.py
     python setup.py test
   )
-  (cd CommonMark-py-${pkgver}-py2
+  (cd commonmark.py-${pkgver}-py2
     export PYTHONPATH=.
     export PYTHONIOENCODING=UTF-8
     python2 CommonMark/tests/unit_tests.py
@@ -48,7 +54,7 @@ check() {
 package_python-commonmark() {
   depends=('python-docutils' 'python-future')
 
-  cd CommonMark-py-${pkgver}
+  cd commonmark.py-${pkgver}
   python setup.py install --root="${pkgdir}" -O1 --skip-build
   install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
@@ -60,7 +66,7 @@ package_python-commonmark() {
 package_python2-commonmark() {
   depends=('python2-docutils' 'python2-future')
 
-  cd CommonMark-py-${pkgver}-py2
+  cd commonmark.py-${pkgver}-py2
   python2 setup.py install --root="${pkgdir}" -O1 --skip-build
   install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/python-3.8.patch b/python-3.8.patch
new file mode 100644
index 0000000000000000000000000000000000000000..74cab033a9f8ee9d83898960991f2e558a0947bc
--- /dev/null
+++ b/python-3.8.patch
@@ -0,0 +1,41 @@
+From cc242c43642a5249cd8aedd6c52dad257b95ab4b Mon Sep 17 00:00:00 2001
+From: Axel Haustant <noirbizarre@gmail.com>
+Date: Mon, 4 Mar 2019 13:00:34 +0100
+Subject: [PATCH] Use timeit.default_counter() instead of time.clock()
+ (deprecated on Python 3.3+)
+
+---
+ commonmark/tests/run_spec_tests.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/commonmark/tests/run_spec_tests.py b/commonmark/tests/run_spec_tests.py
+index 346e46f..7091ab3 100755
+--- a/commonmark/tests/run_spec_tests.py
++++ b/commonmark/tests/run_spec_tests.py
+@@ -2,7 +2,7 @@
+ # coding: utf-8
+ from __future__ import division, print_function, unicode_literals
+ import re
+-import time
++import timeit
+ import codecs
+ import argparse
+ import sys
+@@ -124,7 +124,7 @@ def showSpaces(t):
+ 
+     current_section = ""
+ 
+-    startTime = time.clock()
++    startTime = timeit.default_timer()
+ 
+     if args.i:
+         print(
+@@ -223,7 +223,7 @@ def showSpaces(t):
+ 
+     print('\n' + str(passed) + ' tests passed, ' + str(failed) + ' failed')
+ 
+-    endTime = time.clock()
++    endTime = timeit.default_timer()
+     runTime = endTime - startTime
+ 
+     if args.s: