Skip to content
Snippets Groups Projects
Commit 0124690d authored by Jan Mach's avatar Jan Mach
Browse files

Divided the whole project into three separate PyPI packages.

For the purpose of better reusability the whole project was divided into following PyPI packages:

* ipranges
* typedcols
* idea-format

Each of these packages resides in separate subdirectory with it`s own makefile, readme file and setup.py.
parent 1b301749
No related branches found
No related tags found
No related merge requests found
Showing
with 208 additions and 31 deletions
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*.pyc *.pyc
*.egg-info *.egg-info
__pycache__ __pycache__
build
# Grunt automation tool related stuff # Grunt automation tool related stuff
/node_modules/ /node_modules/
DOCDIR = doc
DIST_SIZE:=$(shell ls dist | wc -l)
all: archive bdist deploy
# Move old distribution files to archive directory
archive:
$(info Checking if dist archivation is needed)
@if ! [ `ls dist | wc -l` = "0" ]; then\
echo "Moving old distribution files to archive";\
mv -f dist/* archive;\
fi
# Build various Python package distributions
bdist:
#python3 setup.py sdist bdist_wheel upload
python setup.py sdist
python3 setup.py sdist
python3 setup.py bdist_wheel --universal
$(info Distributions built)
# Perform installation from local files for both Python 2 and 3
install:
pip install dist/idea*.whl
pip3 install dist/idea*.whl
# Deploy latest packages to PyPI
deploy:
#python3 setup.py sdist bdist_wheel upload
#twine upload dist/*
$(info Deployment is not supported yet)
File moved
#-------------------------------------------------------------------------------
# Copyright (c) since 2016, CESNET, z. s. p. o.
# Authors: Pavel Kácha <pavel.kacha@cesnet.cz>
# Jan Mach <jan.mach@cesnet.cz>
# Use of this source is governed by an ISC license, see LICENSE file.
#-------------------------------------------------------------------------------
all: archive bdist deploy
build: archive bdist
help:
$(info List of possible make targets:)
$(info )
$(info * all: archive previous packages, build new distribution and deploy to PyPI [default])
$(info * build: archive previous packages and build new distribution)
$(info * test: run unit tests)
$(info * archive: archive previous packages)
$(info * bdist: build new distribution)
$(info * install: install distribution on local machine)
$(info * deploy: deploy to PyPI)
$(info )
# Perform unit tests
test: FORCE
$(info Testing source code)
nosetests
# Move old distribution files to archive directory
archive: FORCE
$(info Checking if dist archivation is needed)
@if ! [ `ls dist/idea-format* | wc -l` = "0" ]; then\
echo "Moving old distribution files to local archive";\
mv -f dist/idea-format* archive;\
fi
# Build various Python package distributions
bdist:
$(info Building distributions)
# Build and upload (insecure)
#python3 setup.py sdist bdist_wheel upload
# Build only
python3 setup.py sdist bdist_wheel --universal
# Perform installation from local files for both Python 2 and 3
install: FORCE
$(info Local installation)
pip install dist/idea-format*.whl
pip3 install dist/idea-format*.whl
# Deploy latest packages to PyPI
deploy: FORCE
$(info PyPI deployment)
# Secure upload with Twine
twine upload dist/idea-format*
# Empty rule as dependency wil force make to always perform target
# Source: https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE:
idea-format
================================================================================
Python 2 and 3 compatible library for working with IDEA messages.
This README file is work in progress, for more information please visit home page
at https://idea.cesnet.cz/en/index.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Copyright (c) since 2016, CESNET, z. s. p. o.
# Authors: Pavel Kácha <pavel.kacha@cesnet.cz>
# Jan Mach <jan.mach@cesnet.cz>
# Use of this source is governed by an ISC license, see LICENSE file.
#-------------------------------------------------------------------------------
# Resources:
# https://packaging.python.org/distributing/
# http://python-packaging-user-guide.readthedocs.io/distributing/
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name = 'idea-format',
version = '0.1.7',
description = 'Python library for working with IDEA messages.',
long_description = long_description,
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: ISC License (ISCL)',
'Programming Language :: Python',
],
keywords = 'library',
url = 'https://homeproj.cesnet.cz/git/idea.git',
author = 'Pavel Kacha',
author_email = 'pavel.kacha@cesnet.cz',
license = 'ISC',
packages = ['idea'],
test_suite = 'nose.collector',
tests_require = [
'nose'
],
install_requires=[
'ipranges',
'typedcols'
],
zip_safe = True
)
Copyright (c) 2016, CESNET, z. s. p. o.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file
#-------------------------------------------------------------------------------
# Copyright (c) since 2016, CESNET, z. s. p. o.
# Authors: Pavel Kácha <pavel.kacha@cesnet.cz>
# Jan Mach <jan.mach@cesnet.cz>
# Use of this source is governed by an ISC license, see LICENSE file.
#-------------------------------------------------------------------------------
all: archive bdist deploy
build: archive bdist
help:
$(info List of possible make targets:)
$(info )
$(info * all: archive previous packages, build new distribution and deploy to PyPI [default])
$(info * build: archive previous packages and build new distribution)
$(info * test: run unit tests)
$(info * archive: archive previous packages)
$(info * bdist: build new distribution)
$(info * install: install distribution on local machine)
$(info * deploy: deploy to PyPI)
$(info )
# Perform unit tests
test: FORCE
$(info Testing source code)
nosetests
# Move old distribution files to archive directory
archive: FORCE
$(info Checking if dist archivation is needed)
@if ! [ `ls dist/ipranges* | wc -l` = "0" ]; then\
echo "Moving old distribution files to local archive";\
mv -f dist/ipranges* archive;\
fi
# Build various Python package distributions
bdist:
$(info Building distributions)
# Build and upload (insecure)
#python3 setup.py sdist bdist_wheel upload
# Build only
python3 setup.py sdist bdist_wheel --universal
# Perform installation from local files for both Python 2 and 3
install: FORCE
$(info Local installation)
pip install dist/ipranges*.whl
pip3 install dist/ipranges*.whl
# Deploy latest packages to PyPI
deploy: FORCE
$(info PyPI deployment)
# Secure upload with Twine
twine upload dist/ipranges*
# Empty rule as dependency wil force make to always perform target
# Source: https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE:
ipranges
================================================================================
Python 2 and 3 compatible library for working with IPv4 and IPv6 addressess in
many notations (sible IP, CIDR, range).
This README file is work in progress, for more information please visit home page
at https://idea.cesnet.cz/en/index.
# Ignore everything in this directory
*
# Except this file
!.gitignore
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment