Merge branch 'master' of github.com:dankamongmen/notcurses into master

This commit is contained in:
nick black 2020-07-30 00:39:41 -04:00
commit 0006c4c914
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
5 changed files with 24 additions and 2 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ obj-x86_64-linux-gnu
python/.eggs/
python/build/
python/dist/
python/notcurses-pydemo.1
python/src/notcurses.egg-info/
python/src/_notcurses.so
rust/*/target

View File

@ -120,7 +120,7 @@ that fine library.
* (OPTIONAL) (build+runtime) [OpenImageIO](https://github.com/OpenImageIO/oiio) 2.15.0+
* (OPTIONAL) (testing) [Doctest](https://github.com/onqtam/doctest) 2.3.5+
* (OPTIONAL) (documentation) [pandoc](https://pandoc.org/index.html) 1.19.2+
* (OPTIONAL) (python bindings): Python 3.7+, [CFFI](https://pypi.org/project/cffi/) 1.13.2+
* (OPTIONAL) (python bindings): Python 3.7+, [CFFI](https://pypi.org/project/cffi/) 1.13.2+, [pypandoc](https://pypi.org/project/pypandoc/) 1.5+
* (OPTIONAL) (rust bindings): rust 1.40.0+, cargo 0.40.0+, [bindgen](https://crates.io/crates/bindgen) 0.53.0+
* (runtime) Linux 5.3+ or FreeBSD 11+

View File

@ -1,5 +1,21 @@
from setuptools import setup
from setuptools.command.install import install
import os
import sys
import pypandoc
class ManPageGenerator(install):
def run(self):
here = os.path.dirname(__file__) or '.'
files = []
outfile = 'notcurses-pydemo.1'
pypandoc.convert_file(os.path.join(here, 'notcurses-pydemo.1.md'), 'man', outputfile=outfile, extra_args=['-s'])
files.append(outfile)
# this breaks when using --user without --prefix
ipage = (os.path.join(self.prefix, 'share', 'man', 'man1'), files)
self.distribution.data_files.append(ipage)
print("data_files: ", self.distribution.data_files)
super().run()
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
@ -20,6 +36,7 @@ setup(
platforms=["any"],
long_description=read('README.md'),
long_description_content_type="text/markdown",
data_files=[],
install_requires=["cffi>=1.0.0"],
setup_requires=["cffi>=1.0.0"],
cffi_modules=["src/notcurses/build_notcurses.py:ffibuild"],
@ -31,4 +48,8 @@ setup(
'Natural Language :: English',
'Programming Language :: Python',
],
include_package_data=True,
cmdclass=dict(
install=ManPageGenerator,
)
)

View File

@ -15,7 +15,7 @@ vi NEWS.md
git clean -f -d -x
# bump version numbers wherever they occur (wherever we enumerate them, anyway)
BUMP="CMakeLists.txt doc/Doxyfile doc/man/man*/* doc/man/index.html python/setup.py rust/*/Cargo.toml rust/libnotcurses-sys/build.rs"
BUMP="CMakeLists.txt doc/Doxyfile doc/man/man*/* doc/man/index.html python/setup.py python/notcurses-pydemo.1.md rust/*/Cargo.toml rust/libnotcurses-sys/build.rs"
for i in $BUMP ; do
sed -i -e "s/$OLDVERSION/$VERSION/g" $i
done