Skip to content

Commit

Permalink
Merge pull request #143 from HanslettTheDev/readme-docs
Browse files Browse the repository at this point in the history
Use the README file as the docs on PYPI
  • Loading branch information
reingart authored Oct 6, 2023
2 parents c76424a + 92908b5 commit 8f8a5bf
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,17 @@
opts = {}
data_files = [("pyafipws/plantillas", glob.glob("plantillas/*"))]


long_desc = (
"Interfases, herramientas y aplicativos para Servicios Web"
"AFIP (Factura Electrónica, Granos, Aduana, etc.), "
"ANMAT (Trazabilidad de Medicamentos), "
"RENPRE (Trazabilidad de Precursores Químicos), "
"ARBA (Remito Electrónico)"
)

# convert the README and format in restructured text (only when registering)
if "sdist" in sys.argv and os.path.exists("README.md") and sys.platform == "linux2":
try:
cmd = ["pandoc", "--from=markdown", "--to=rst", "README.md"]
long_desc = subprocess.check_output(cmd).decode("utf8")
open("README.rst", "w").write(long_desc.encode("utf8"))
except Exception as e:
warnings.warn("Exception when converting the README format: %s" % e)

# from docs https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/
parent_dir = os.getcwd()
long_desc = open(os.path.join(parent_dir, "README.md")).read()

setup(
name="PyAfipWs",
version=__version__,
description=desc,
long_description=long_desc,
long_description_content_type="text/markdown",
author="Mariano Reingart",
author_email="[email protected]",
url="https://github.com/reingart/pyafipws",
Expand Down

0 comments on commit 8f8a5bf

Please sign in to comment.