Skip to content

Commit 51b9204

Browse files
committed
Add setup files
Signed-off-by: Tushar Goel <[email protected]>
1 parent ccb7b61 commit 51b9204

File tree

431 files changed

+366
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

431 files changed

+366
-46
lines changed

.travis.yml

+12-46
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,17 @@
1-
language: python
2-
3-
4-
matrix:
5-
include:
6-
- os: linux
7-
python: 3.6
8-
- os: linux
9-
python: 3.7
10-
- os: linux
11-
python: 3.8
12-
- os: osx
13-
language: generic
14-
env: PYTHON_VERSION=3.6.0
15-
- os: osx
16-
language: generic
17-
env: PYTHON_VERSION=3.7.0
18-
- os: osx
19-
language: generic
20-
env: PYTHON_VERSION=3.8.0
21-
1+
# See https://config.travis-ci.com/ for a full list of configuration options.
222

23-
install:
24-
- |
25-
# Manually installing pyenv and the required python version as travis does not support python builds on MacOS
26-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
27-
brew update
28-
brew install pyenv
29-
eval "$(pyenv init -)"
30-
pyenv install --skip-existing $PYTHON_VERSION
31-
pyenv global $PYTHON_VERSION
32-
pyenv shell $PYTHON_VERSION
33-
pip install -U pip setuptools wheel py
34-
fi
35-
pip install -r requirements.txt
3+
os: linux
364

5+
dist: xenial
376

38-
script:
39-
python -m pytest
40-
41-
42-
cache:
43-
directories:
44-
# Caching homebrew and pyenv directories to reduce build time (as they add several minutes otherwise)
45-
- $HOME/Library/Caches/Homebrew
46-
- /usr/local/Homebrew
47-
- $HOME/.pyenv/versions
7+
language: python
8+
python:
9+
- "3.6"
10+
- "3.7"
11+
- "3.8"
4812

13+
# Scripts to run at install stage
14+
install: ./configure
4915

50-
before_cache:
51-
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
16+
# Scripts to run at script stage
17+
script: tmp/bin/pytest tests

AUTHORS.rst

+8

CHANGELOG.rst

+5
File renamed without changes.

configure

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
4+
#
5+
6+
set -e
7+
#set -x
8+
9+
# source this script for a basic setup and configuration for local development
10+
11+
CONFIGURE_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
12+
13+
14+
if [[ "$1" == "--clean" ]]; then
15+
rm -rf "$CONFIGURE_ROOT_DIR/tmp"
16+
exit
17+
fi
18+
19+
20+
if [[ "$PYTHON_EXE" == "" ]]; then
21+
PYTHON_EXE=python3
22+
fi
23+
24+
25+
function setup {
26+
# create a virtualenv on Python
27+
mkdir -p $CONFIGURE_ROOT_DIR/tmp
28+
wget -O $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz https://bootstrap.pypa.io/virtualenv.pyz
29+
$PYTHON_EXE $CONFIGURE_ROOT_DIR/tmp/virtualenv.pyz $CONFIGURE_ROOT_DIR/tmp
30+
source $CONFIGURE_ROOT_DIR/tmp/bin/activate
31+
$CONFIGURE_ROOT_DIR/tmp/bin/pip install --upgrade pip virtualenv setuptools wheel
32+
}
33+
34+
35+
setup
36+
37+
$CONFIGURE_ROOT_DIR/tmp/bin/pip install -e .[testing]
38+
$CONFIGURE_ROOT_DIR/tmp/bin/pip install fetchcode
39+
40+
if [ -f "$CONFIGURE_ROOT_DIR/tmp/bin/activate" ]; then
41+
source "$CONFIGURE_ROOT_DIR/tmp/bin/activate"
42+
fi
43+
44+
set +e

pyproject.toml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[build-system]
2+
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 4"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]
6+
7+
[tool.pytest.ini_options]
8+
norecursedirs = [
9+
".git",
10+
"bin",
11+
"dist",
12+
"build",
13+
"_build",
14+
"dist",
15+
"etc",
16+
"local",
17+
"ci",
18+
"docs",
19+
"man",
20+
"share",
21+
"samples",
22+
".cache",
23+
".settings",
24+
"Include",
25+
"include",
26+
"Lib",
27+
"lib",
28+
"lib64",
29+
"Lib64",
30+
"Scripts",
31+
"thirdparty",
32+
"tmp",
33+
"tests/data",
34+
".eggs"
35+
]
36+
37+
python_files = "*.py"
38+
39+
python_classes="Test"
40+
python_functions="test"
41+
42+
addopts = [
43+
"-rfExXw",
44+
"--strict",
45+
"--doctest-modules"
46+
]

setup.cfg

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[wheel]
2+
universal=1
3+
4+
[metadata]
5+
license_file = apache-2.0.LICENSE
6+
name = fetchcode
7+
author = nexB. Inc. and others
8+
author_email = [email protected]
9+
description = fetchcode is a library to reliably fetch code via HTTP, FTP and version control systems.
10+
long_description = file:README.rst
11+
url = https://github.com/nexB/fetchcode
12+
classifiers =
13+
Development Status :: 5 - Production/Stable
14+
Intended Audience :: Developers
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3 :: Only
17+
Topic :: Software Development
18+
Topic :: Utilities
19+
keywords =
20+
21+
[options]
22+
package_dir=
23+
=src
24+
packages=find:
25+
include_package_data = true
26+
zip_safe = false
27+
install_requires =
28+
attrs
29+
packageurl-python
30+
requests
31+
six
32+
setup_requires = setuptools_scm[toml] >= 4
33+
34+
[options.packages.find]
35+
where=src
36+
37+
[options.extras_require]
38+
testing =
39+
# upstream
40+
pytest
41+
pytest-xdist
42+
full =
43+
fetchcode

setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env python
2+
3+
import setuptools
4+
5+
if __name__ == "__main__":
6+
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.

0 commit comments

Comments
 (0)