aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-12 22:08:00 +0200
committerjaseg <git@jaseg.de>2022-06-12 22:08:00 +0200
commitd61d642c390588fe63c9f0ad5b930b421f55b0e8 (patch)
tree776a482c6c335f6a6796cc5aa69e0525db773ffd
parent8ccbc98706ae78ac5cc5b0a4e8c217f8141e9fa8 (diff)
downloadgerbolyze-d61d642c390588fe63c9f0ad5b930b421f55b0e8.tar.gz
gerbolyze-d61d642c390588fe63c9f0ad5b930b421f55b0e8.tar.bz2
gerbolyze-d61d642c390588fe63c9f0ad5b930b421f55b0e8.zip
ci: Also build sdistsv3.0.4
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--MANIFEST.in18
-rwxr-xr-xgerbolyze/__init__.py (renamed from gerbolyze/gerbolyze.py)0
-rwxr-xr-xgerbolyze/command_line.py35
-rwxr-xr-xsetup.py8
5 files changed, 14 insertions, 51 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e73e5e2..dd9054e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,11 +17,11 @@ build:gerbolyze:
script:
- git config --global --add safe.directory "$CI_PROJECT_DIR"
- pip3 install --user wheel
- - python3 setup.py bdist_wheel
+ - python3 setup.py sdist bdist_wheel
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbolyze"
paths:
- - dist/*.whl
+ - dist/*
publish:gerbolyze:
stage: publish
diff --git a/MANIFEST.in b/MANIFEST.in
index 031eca7..a95aa03 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,10 +1,8 @@
-recursive-include svg-flatten *
-recursive-include upstream *
-recursive-exclude upstream/voronoi/test *
-recursive-exclude upstream/subprocess.h/test *
-recursive-exclude upstream/poisson-disk-sampling/thinks/poisson_disk_sampling/examples *
-recursive-exclude upstream/poisson-disk-sampling/images *
-recursive-exclude upstream/clipper-6.4.2/Documentation *
-recursive-exclude upstream/CavalierContours tests/* examples/*
-recursive-exclude upstream/argagg doc/* examples/* tests/*
-recursive-exclude svg-flatten/build *
+global-exclude *
+
+include README.rst
+include LICENSE
+include MANIFEST.in
+include setup.py
+
+recursive-include gerbolyze *.py
diff --git a/gerbolyze/gerbolyze.py b/gerbolyze/__init__.py
index e9e7e5f..e9e7e5f 100755
--- a/gerbolyze/gerbolyze.py
+++ b/gerbolyze/__init__.py
diff --git a/gerbolyze/command_line.py b/gerbolyze/command_line.py
deleted file mode 100755
index e6c6d67..0000000
--- a/gerbolyze/command_line.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python3
-
-import gerbolyze
-
-if __name__ == '__main__':
- # Parse command line arguments
- import argparse
- parser = argparse.ArgumentParser()
-
- subcommand = parser.add_subparsers(help='Sub-commands')
- subcommand.required, subcommand.dest = True, 'command'
- vectorize_parser = subcommand.add_parser('vectorize', help='Vectorize bitmap image onto gerber layer')
- render_parser = subcommand.add_parser('render', help='Render bitmap preview of board suitable as a template for positioning and scaling the input image')
-
- parser.add_argument('-d', '--debugdir', type=str, default=None, help='Directory to place intermediate images into for debuggin')
-
- vectorize_parser.add_argument('side', choices=['top', 'bottom'], help='Target board side')
- vectorize_parser.add_argument('--layer', '-l', choices=['silk', 'mask', 'copper'], default='silk', help='Target layer on given side')
-
- vectorize_parser.add_argument('source', help='Source gerber directory')
- vectorize_parser.add_argument('target', help='Target gerber directory')
- vectorize_parser.add_argument('image', help='Image to render')
-
- render_parser.add_argument('--fab-resolution', '-r', type=float, nargs='?', default=6.0, help='Smallest feature size supported by PCB manufacturer, in mil. On silkscreen layers, this is the minimum font stroke width.')
- render_parser.add_argument('--oversampling', '-o', type=float, nargs='?', default=10, help='Oversampling factor for the image. If set to say, 10 pixels, one minimum feature size (see --fab-resolution) will be 10 pixels long. The input image for vectorization should not contain any detail of smaller pixel size than this number in order to be manufacturable.')
- render_parser.add_argument('side', choices=['top', 'bottom'], help='Target board side')
- render_parser.add_argument('source', help='Source gerber directory')
- render_parser.add_argument('image', help='Output image filename')
- args = parser.parse_args()
-
- if args.command == 'vectorize':
- gerbolyze.process_gerbers(args.source, args.target, args.image, args.side, args.layer, args.debugdir)
- else: # command == render
- gerbolyze.render_preview(args.source, args.image, args.side, args.fab_resolution, args.oversampling)
-
diff --git a/setup.py b/setup.py
index e1be86e..970ece3 100755
--- a/setup.py
+++ b/setup.py
@@ -28,8 +28,7 @@ def format_readme_for_pypi():
setup(
name = 'gerbolyze',
version = get_version(),
- py_modules = ['gerbolyze'],
- package_dir = {'': 'gerbolyze'},
+ packages=['gerbolyze'],
entry_points = '''
[console_scripts]
gerbolyze=gerbolyze:cli
@@ -41,9 +40,10 @@ setup(
'conversions to raster images accurately preserving the input.'),
long_description=format_readme_for_pypi(),
long_description_content_type='text/x-rst',
+ url='https://github.com/jaseg/gerbolyze',
project_urls={
- "Source Code": "https://git.jaseg.de/gerbolyze",
- "Bug Tracker": "https://github.com/jaseg/gerbolyze/issues",
+ 'Source Code': 'https://git.jaseg.de/gerbolyze',
+ 'Bug Tracker': 'https://github.com/jaseg/gerbolyze/issues',
},
author = 'jaseg',
author_email = 'gerbonara@jaseg.de',