Skip to content

Commit

Permalink
Preparation for PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaphe committed Nov 24, 2020
1 parent ede9e96 commit dc3a4cc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
README.html
*.tex
__pycache__
LaTeXDatax.egg-info/
build/
dist/
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.PHONY: clean all test
.PHONY: clean all test publish

all: README.html test
all: README.html test dist/

dist/ : setup.py LaTeXDatax/datax.py
python $< sdist bdist_wheel

test: tests/test_LaTeXDatax.py LaTeXDatax/datax.py
pip install .
Expand All @@ -9,5 +12,8 @@ test: tests/test_LaTeXDatax.py LaTeXDatax/datax.py
README.html : README.md
md2html --github $< -o $@

publish : dist/
python -m twine upload dist/*

clean :
rm -f __pycache__ README.html
rm -rf __pycache__/ LateXDatax/__pycache__/ README.html LaTeXDatax.egg-info/ build/ dist/
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Import calculated values from a python script into a LaTeX document.
This is a python interface for [the datax LaTeX package [ctan]](https://ctan.org/pkg/datax).

## Installation
One method that works, though it may not be *the way* in python, is downloading the repo, and running `pip install .` in the root directory of it.
```
pip install "LaTeXDatax"
```

## Usage
In a python script:
Expand All @@ -30,6 +32,5 @@ In the LaTeX document:
```

## Looking for contributors
I don't know python very well. This should be a working package, but it would probably be better in more comfortable hands.
Specifically, I'm not sure how to distribute packages in the python ecosystem.
I don't know python very well. This package works, but if you have ideas for how to improve it, or you spot some python faux pas, feel free to make a PR or get in touch!

17 changes: 14 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
from setuptools import setup, find_packages

with open('README.md', 'r') as fh:
long_description = fh.read()

setup(
name='LaTeXDatax',
version='1.0',
description='Export python variables to LaTeX documents',
version='1.1',
author='David Gustavsson',
author_email='[email protected]',
description='Export individual data from a Python script to a LaTeX document',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/Datax-package/LaTeXDatax.py',
packages=find_packages(),
install_requires=[],
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)


0 comments on commit dc3a4cc

Please sign in to comment.