Skip to content

Commit

Permalink
Merge pull request #46 from TG1999/publish
Browse files Browse the repository at this point in the history
Add setup files, Author and Changelog
  • Loading branch information
pombredanne authored Mar 30, 2021
2 parents ccb7b61 + 51b9204 commit 42110e9
Show file tree
Hide file tree
Showing 431 changed files with 366 additions and 46 deletions.
58 changes: 12 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,17 @@
language: python


matrix:
include:
- os: linux
python: 3.6
- os: linux
python: 3.7
- os: linux
python: 3.8
- os: osx
language: generic
env: PYTHON_VERSION=3.6.0
- os: osx
language: generic
env: PYTHON_VERSION=3.7.0
- os: osx
language: generic
env: PYTHON_VERSION=3.8.0

# See https://config.travis-ci.com/ for a full list of configuration options.

install:
- |
# Manually installing pyenv and the required python version as travis does not support python builds on MacOS
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install pyenv
eval "$(pyenv init -)"
pyenv install --skip-existing $PYTHON_VERSION
pyenv global $PYTHON_VERSION
pyenv shell $PYTHON_VERSION
pip install -U pip setuptools wheel py
fi
pip install -r requirements.txt
os: linux

dist: xenial

script:
python -m pytest


cache:
directories:
# Caching homebrew and pyenv directories to reduce build time (as they add several minutes otherwise)
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
- $HOME/.pyenv/versions
language: python
python:
- "3.6"
- "3.7"
- "3.8"

# Scripts to run at install stage
install: ./configure

before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Scripts to run at script stage
script: tmp/bin/pytest tests
8 changes: 8 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The following organizations or individuals have contributed to this repo:

- Mayank Chandra @ jimc404
- Michael Herzog @ mjherzog
- Philippe Ombredanne @ pombredanne
- Steven Esser @ majurg
- Tushar Goel @ TG1999

5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Release notes
-------------
### Version 0.0.1 2020-10-29

Initial release
File renamed without changes.
44 changes: 44 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
#

set -e
#set -x

# source this script for a basic setup and configuration for local development

CONFIGURE_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"


if [[ "$1" == "--clean" ]]; then
rm -rf "$CONFIGURE_ROOT_DIR/tmp"
exit
fi


if [[ "$PYTHON_EXE" == "" ]]; then
PYTHON_EXE=python3
fi


function setup {
# create a virtualenv on Python
mkdir -p $CONFIGURE_ROOT_DIR/tmp
wget -O $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz https://bootstrap.pypa.io/virtualenv.pyz
$PYTHON_EXE $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz $CONFIGURE_ROOT_DIR/tmp
source $CONFIGURE_ROOT_DIR/tmp/bin/activate
$CONFIGURE_ROOT_DIR/tmp/bin/pip install --upgrade pip virtualenv setuptools wheel
}


setup

$CONFIGURE_ROOT_DIR/tmp/bin/pip install -e .[testing]
$CONFIGURE_ROOT_DIR/tmp/bin/pip install fetchcode

if [ -f "$CONFIGURE_ROOT_DIR/tmp/bin/activate" ]; then
source "$CONFIGURE_ROOT_DIR/tmp/bin/activate"
fi

set +e
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 4"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.pytest.ini_options]
norecursedirs = [
".git",
"bin",
"dist",
"build",
"_build",
"dist",
"etc",
"local",
"ci",
"docs",
"man",
"share",
"samples",
".cache",
".settings",
"Include",
"include",
"Lib",
"lib",
"lib64",
"Lib64",
"Scripts",
"thirdparty",
"tmp",
"tests/data",
".eggs"
]

python_files = "*.py"

python_classes="Test"
python_functions="test"

addopts = [
"-rfExXw",
"--strict",
"--doctest-modules"
]
43 changes: 43 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[wheel]
universal=1

[metadata]
license_file = apache-2.0.LICENSE
name = fetchcode
author = nexB. Inc. and others
author_email = [email protected]
description = fetchcode is a library to reliably fetch code via HTTP, FTP and version control systems.
long_description = file:README.rst
url = https://github.com/nexB/fetchcode
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Topic :: Software Development
Topic :: Utilities
keywords =

[options]
package_dir=
=src
packages=find:
include_package_data = true
zip_safe = false
install_requires =
attrs
packageurl-python
requests
six
setup_requires = setuptools_scm[toml] >= 4

[options.packages.find]
where=src

[options.extras_require]
testing =
# upstream
pytest
pytest-xdist
full =
fetchcode
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python

import setuptools

if __name__ == "__main__":
setuptools.setup()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 42110e9

Please sign in to comment.