Skip to content

Commit

Permalink
refactor dependencies and installation
Browse files Browse the repository at this point in the history
There are hard copies of the graphviz and pyyaml dependencies included
in the repo. Remove these.

Sort out installation and dependency handling by writing a functional
setup.py script. Rename top level documentation. Refactor wireviz.py
slightly to allow it to run as an installed script.

# Conflicts:
#	src/batch.py
#	src/wireviz/batch.py
#	src/wireviz/build_examples.py
  • Loading branch information
n42 authored and 17o2 committed Jun 28, 2020
1 parent dfb184c commit 5514fd4
Show file tree
Hide file tree
Showing 33 changed files with 117 additions and 7,217 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
.DS_Store
temp/
.eggs
__pycache__
.*.swp
*.egg-info
*.pyc
build
data
dist
File renamed without changes.
2 changes: 1 addition & 1 deletion readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mywire.html HTML page with wiring diagram and BOM embedded

## Status

This is very much a [work in progress](todo.md). Source code, API, syntax and functionality may change wildly at any time.
This is very much a [work in progress](TODO). Source code, API, syntax and functionality may change wildly at any time.

## Requirements

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
45 changes: 45 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/python3

import os
from setuptools import setup, find_packages

project_name = 'wireviz'

# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(

This comment has been minimized.

Copy link
@KOLANICH

KOLANICH Jun 30, 2020

all the metadata can be moved into setup.cfg leaving setup()

name=project_name,
version='0.1',

This comment has been minimized.

Copy link
@KOLANICH

KOLANICH Jun 30, 2020

use setuptools_scm

author='Daniel Rojas',
#author_email='',
description='Easily document cables and wiring harnesses',
long_description=read(os.path.join(os.path.dirname(__file__), 'README.md')),

This comment has been minimized.

Copy link
@KOLANICH

KOLANICH Jun 30, 2020

BTW, python 2 is EOL

long_description_content_type='text/markdown',
install_requires=[
'pyyaml',

This comment has been minimized.

Copy link
@KOLANICH

KOLANICH Jun 30, 2020

ruamel.yaml is far far more flexible

'graphviz',
],
license='GPLv3',
keywords='cable connector hardware harness wiring wiring-diagram wiring-harness',
url='https://github.com/n42/WireViz',
package_dir={'': 'src'},
packages=find_packages('src'),
entry_points={
'console_scripts': ['wireviz=wireviz.wireviz:main'],
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Utilities',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
],

)
63 changes: 0 additions & 63 deletions src/graphviz/__init__.py

This file was deleted.

69 changes: 0 additions & 69 deletions src/graphviz/_compat.py

This file was deleted.

Loading

0 comments on commit 5514fd4

Please sign in to comment.