Moved the module to the root and added a script named kiplot to call it from /usr/bin.

Simplified the setup.py to make it work with Debian.
Added Debian package files.
Added a MANIFEST.in
This commit is contained in:
Salvador E. Tropea 2020-03-10 14:49:18 -03:00
parent 57ccd12308
commit 49bb86d748
22 changed files with 124 additions and 45 deletions

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include MANIFEST.in
include LICENSE
include README.md

9
Makefile Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/make
deb:
fakeroot dpkg-buildpackage -uc -b
deb_clean:
fakeroot debian/rules clean
.PHONY: deb deb_clean

6
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,6 @@
kiplot.inti-cmnb for Debian
This is a KiCad plotter that uses the Python interface to plot gerbers and
other files.
-- Salvador Eduardo Tropea <salvador@inti.gob.ar> Tue, 10 Mar 2020 13:27:48 -0300

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
kiplot.inti-cmnb (0.1.0-1) testing; urgency=low
* Initial release.
-- Salvador Eduardo Tropea <salvador@inti.gob.ar> Tue, 10 Mar 2020 13:27:48 -0300

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
11

19
debian/control vendored Normal file
View File

@ -0,0 +1,19 @@
Source: kiplot.inti-cmnb
Section: electronics
Priority: optional
Maintainer: Salvador Eduardo Tropea <salvador@inti.gob.ar>
Build-Depends: debhelper (>=11~), dh-python, python3-all, python3-setuptools
Standards-Version: 4.1.4
Homepage: https://github.com/INTI-CMNB/kiplot
X-Python3-Version: >= 3.2
Package: kiplot.inti-cmnb
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}, ${python3:Depends}, python3-yaml
Description: KiCad Plotter (KiPlot)
KiPlot is a program which helps you to plot your KiCad PCBs to output
formats easily, repeatable, and most of all, scriptably.
.
This means you can use a Makefile to export your KiCad PCBs just as
needed.

28
debian/copyright vendored Normal file
View File

@ -0,0 +1,28 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: kiplot.inti-cmnb
Source: https://github.com/INTI-CMNB/kiplot
Files: README.md
docs/samples/generic_plot.kiplot.yaml
setup.cfg
setup.py
src/kiplot
src/kiplot_module/__init__.py
src/kiplot_module/__main__.py
src/kiplot_module/__version__.py
src/kiplot_module/config_reader.py
src/kiplot_module/error.py
src/kiplot_module/kiplot.py
src/kiplot_module/plot_config.py
tests/board_samples/simple_2layer.kicad_pcb
tests/conftest.py
tests/test_plot/README.md
tests/test_plot/__init__.py
tests/test_plot/plotting_test_utils.py
tests/test_plot/test_simple_2layer.py
tests/test_yaml.py
tests/yaml_samples/simple_2layer.kiplot.yaml
Copyright: 2018 John Beard
License: GPL-3.0

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
README.md

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
# You must remove unused comment lines for the released package.

6
debian/rules vendored Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
%:
dh $@ --with python3 --buildsystem=pybuild

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
debian/source/local-options vendored Normal file
View File

@ -0,0 +1,2 @@
#abort-on-upstream-changes
#unapply-patches

3
debian/watch vendored Normal file
View File

@ -0,0 +1,3 @@
# You must remove unused comment lines for the released package.
version=3
https://github.com/INTI-CMNB/kiplot/tags .*/(\d[\d\.]*)\.(?:tar.gz|tar.bz2|tar.xz)

View File

@ -1,71 +1,45 @@
# -*- coding: utf-8 -*-
#!/usr/bin/python3
import io
import os
from setuptools import setup, find_packages
from distutils.core import setup
# Package meta-data.
NAME = 'kiplot'
DESCRIPTION = 'Plotting driver for KiCad'
URL = 'https://github.com/johnbeard/kiplot'
URL = 'https://github.com/INTI-CMNB/kiplot/'
EMAIL = 'john.j.beard@gmail.com'
AUTHOR = 'John Beard'
REQUIRES_PYTHON = '>=2.7.0'
# What packages are required for this module to be executed?
REQUIRED = [
'pyyaml',
# 'pcbnew'
]
here = os.path.abspath(os.path.dirname(__file__))
# Import the README and use it as the long-description.
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
long_description = '\n' + f.read()
about = {}
with open(os.path.join(here, 'src', NAME, '__version__.py')) as f:
exec(f.read(), about)
with open(os.path.join(here, NAME, '__version__.py')) as f:
exec(f.read(), about)
# Where the magic happens:
setup(
name=NAME,
setup(name=NAME,
version=about['__version__'],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
packages=find_packages('src'),
package_dir={'': 'src'},
# If your package is a single module, use this instead of 'packages':
# py_modules=['mypackage'],
entry_points={
'console_scripts': ['kiplot=kiplot.__main__:main'],
},
install_requires=REQUIRED,
include_package_data=True,
license='MIT',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
packages=[NAME],
package_dir={NAME: NAME},
scripts=['src/kiplot'],
install_requires=['pyyaml'],
classifiers = ['Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
platforms = 'POSIX',
license = 'GPL-3.0'
)

20
src/kiplot Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""
@package
KiPlot - KiCad Python API plotter
KiPlot is a program which helps you to plot your KiCad PCBs to output
formats easily, repeatable, and most of all, scriptably. This means you
can use a Makefile to export your KiCad PCBs just as needed.
"""
import sys
import os
here = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.dirname(here))
from kiplot.__main__ import main
main()