Git Product home page Git Product logo

vsc-install's Introduction

Description

vsc-install provides shared setuptools functions and classes for python libraries developed by UGent's HPC group

Common pitfalls

bdist_rpm will fail if your install_requires = 'setuptools' because it will fail to find a setuptools rpm.

export VSC_RPM_PYTHON=1

will make sure the python- prefix is added to the packages in install_requires for building RPM's so python-setuptools will be used.

Add tests

Test are python modules in the test directory which have subclass of TestCase and at least one method that has a name starting with test_

You are advised to use

from vsc.install.testing import TestCase

(instead of basic TestCase from unittest).

And any __main__ or suite() is not needed (anymore).

Initialise the test directory with

mkdir -p test
echo '' > test/__init__.py
echo 'from vsc.install.commontest import CommonTest' > test/00-import.py

When the tests are run, test, lib and bin (if relevant) are added to sys.path, so no need to do so in the tets modules.

Run tests

python setup.py test

Filter tests with -F (test module names) and -f (test method names)

See also

python setup.py test --help

The dependencies are installed automatically in the .eggs directory. It will first try github.ugent.be and then github.com to install them. The same method is used as through which the original repository was cloned (http, ssh, ...). In case you need private dependencies, always clone with ssh.

In case following error occurs, it means there is a test module XYZ that cannot be imported.

File "setup.py", line 499, in loadTestsFromModule
    testsuites = ScanningLoader.loadTestsFromModule(self, module)
File "build/bdist.linux-x86_64/egg/setuptools/command/test.py", line 37, in loadTestsFromModule
File "/usr/lib64/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'XYZ'

You can try get the actual import error for fixing the issue with

python -c 'import sys;sys.path.insert(0, "test");import XYZ;'

Fix failing tests

  • Missing / incorrect LICENSE

  • Copy the appropirate license file under known_licenses in the project directory and name the file LICENSE

  • Missing README.md

  • Create a README.md file with at least a Description section

  • Fix license headers as described in https://github.com/hpcugent/vsc-install/blob/master/lib/vsc/install/headers.py

    cd <project dir with .git folder>
    REPO_BASE_DIR=$PWD python -m vsc.install.headers path/to/file script_or_not
    

    Fix them all at once using find

    find ./{lib,test} -type f -name '*.py' | REPO_BASE_DIR=$PWD xargs -I '{}' python -m vsc.install.headers '{}'
    find ./bin -type f -name '*.py' | REPO_BASE_DIR=$PWD xargs -I '{}' python -m vsc.install.headers '{}' 1
    

    Do not forget to check the diff. Modules/scripts without docstring (or magic comment '### END OF HEADER') (incl. test modules) will get correct header appended to existing one. Add a docstring (or magic comment) to resolve this.

  • Python scripts (i.e. with a python shebang and installed as scripts in setup) have to use #!/usr/bin/env python as shebang

  • Remove any build_rpms_settings.sh leftovers

  • The TARGET dict in setup.py should be minimal unless you really know what you are doing (i.e. if it is truly different from defaults)

  • Remove name, scripts, ...

  • Exception: vsc namespace packages do not allow non-shared namespace

  • Add to the __init__.py

"""
Allow other packages to extend this namespace, zip safe setuptools style
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)

bare-except

try:
   # something
except:

This is bad, because this except will also catch sys.exit() or Keyboardinterupts, something you typically do not want, if you catch these the program will be in a weird state and then continue on, whilst the person who just pressed ctrl+c is wondering what is going on and why it is not stopping.

so at the very least make this except Exception (which doesn't catch sys.exit and KeyboardInterupt) and it would be appreciated if you could actually figure out what exceptions to expect and only catch those and let your program crash if something you did not intend happens because it helps developers catch weird errors on their side better.

if you do something like

try:
    Path(int(somestring)).write_text('important data')
except Exception:
    pass # if somestring is not an integer, we didn't need to write anyway, but otherwise we do

because you know sometimes this string does not contain an integer, so the int() call can fail you should really only catch ValueError, because this will also fail when your disk is full, or you don't have permissions or xxx other reasons, and the important data will not be written out and nobody will notice anything!

if not 'a' in somelist -> if 'a' not in somelist

this isn't that big of a deal, but if everyone is consistent it's less likely to introduce bugs when a not is added or removed where it didn't need to. Also helps code review, not in reads better, like english.

arguments-differ

this will give you errors if you override a function of a superclass but don't use the same amount of arguments, using less will surely give you errors, so the linter catches this for you now

unused-argument

if you have a function definition witch accepts an argument that is never used in the function body this will now give an error. clean up your function definition, or fix the error where you actually do need to take this argument into account

unused-variable

defining a variable and then not using it anymore smells bad, why did you do that? sometimes you do things like

out, exit_code = run_command(something)

but you are not interested in the out, only in the exit code, in this case, write

_, exit_code = run_command(something)

using _ as a variable name lets pylint and other readers know you do not intend to use that output in the first place.

reimported

when you re import a name somewhere else, usually this is just an import to much, or 2 imports with the same name, pay attention.

import six
from django import six

=>

import six
from django import six as django_six

redefinition of unused name

this usually also points to something you did not expect

from vsc.accountpageclient import VscGroup
<snip>

class VscGroup(object):
    pass

=> do you need the import? use import as did you mean to use the same name? ...

Redefined builtin

use different name, for example change

def filter(b_b):
    """Function filter"""
    return b_b

=>

def new_filter(b_b):
    """Function filter"""
    return b_b

logging-not-lazy

Don't use string interpolation when logging if not needed:

import logging
name = 'world'
program ='python'
logging.info('Hello %s! This is %s.' % (name, program))

=>

import logging
name = 'world'
program ='python'
logging.info('Hello %s! This is %s.', name, program)

Fix Python 3 failing tests

unpacking-in-except / redefine-in-handler

Multiple exception have to be grouped in a tuple like

    ...
except (ExceptionOne, ExceptionTwo) ...
    ...

(espcially when used like except A, B: which should be except (A, B):.

Old raise syntax

Python 2’s raise statement was designed at a time when exceptions weren’t classes, and an exception’s type, value, and traceback components were three separate objects. In Python 3, one single object includes all information about an exception.

raise NameError, "Error"

=>

raise NameError("Error")

or change

raise NameError, "Error", some_traceback

=>

raise NameError("Error")

e = NameError("Error")
e.__traceback__ = some_traceback

backtick

A = 2
B = `A`

=>

A = 2
B = str(A)

Old ne operator

if 2 <> 3:

=>

if 2 != 3:

Octal literal

os.chmod(foo, 0700)

=>

os.chmod(foo, 0o700)

Import star module level

Do not import *, be more specific. If it is impossible, import it in the top level (and suppress the pyflakes error F403.)

def coords(angle, distance):
    """Function coords"""
    from math import *
    return distance * cos(angle), distance * sin(angle)

=>

from math import *  # noqa: F403
def coords(angle, distance):
    """Function coords"""
    return distance * cos(angle), distance * sin(angle)

Raising string

raise ValueError, 'message'

=>

raise ValueError('message')

Indexing exception

except IndexError as err:
    err[0]

=>

except IndexError as err:
    IndexError.args[0]

turning off these errors

If in any of these cases you think: yes, I really needed to do this, I'm monkeypatching things, I'm adding extra functionality that does indeed have an extra(default) paramenter, etc, etc you can let pylint know to ignore this error in this one specific block of code by adding e.g. the comment # pylint: disable=<name or numeric id of pylint code>

class Something(object):
    def dosomething(self, some, thing):
        # do something

class MyFancyThing(SomeThing):
    # pylint: disable=arguments-differ
    def dosomething(self, some, thing, fancy=None):
         # do something fancy

Full list with all codes is available at http://pylint-messages.wikidot.com/all-codes

Auto-generated Jenkinsfile / tox.ini

vsc-install has support for auto-generating the Jenkinsfile (and accompanying tox.ini), via:

python -m vsc.install.ci

Failing check on (contents of) Jenkinsfile or tox.ini

There are dedicated tests that check whether the Jenkinsfile and tox.ini files were auto-generated by vsc-install.

To fix the tests, simply run python -m vsc.install.ci using the latest version of vsc-install to re-generate Jenkinsfile and tox.ini, and then commit & push the changes.

If the contents of the file that is auto-generated by the latest version of vsc-install is incorrect for whatever reason, you can temporarily bypass the failing test by adding an a file named Jenkinsfile.NOT_AUTOGENERATED_YET or tox.ini.NOT_AUTOGENERATED_YET.

The file must contain the URL of a vsc-install issue, created via via https://github.com/hpcugent/vsc-install/issues/new, where the incorrectly generated file is reported.

Example:

echo "see https://github.com/hpcugent/vsc-install/issues/1234 for more info" > Jenkinsfile.NOT_AUTOGENERATED_YET

Requiring JIRA issue ref in PR title

To also include a check in the Jenkinsfile for having a JIRA issue ref (like [HPC-1234]) in the pull request title, add a configuration file for python -m vsc.install.ci named vsc-ci.ini like this into the repository:

[vsc-ci]
jira_issue_id_in_pr_title=1

Running shellcheck

To also run shellcheck in the generated Jenkinsfile, specify this via a vsc-ci.ini configuration file:

[vsc-ci]
run_shellcheck=1

Adding additional test commands to Jenkinsfile

If additional custom test commands (other than shellcheck) need to be run by the Jenkinsfile, you can speicfy this in vsc-ci.ini via additional_test_commands.

To add a single custom test command:

[vsc-ci]
additional_test_commands=./more_test.sh

To add multiple test commands:

[vsc-ci]
additional_test_commands=
  first-test-cmd
  second-test-cmd
  third-test-cmd

Overriding install location of scripts

In some repositories we specify a system-wide install location for scripts via setup.cfg (see for example the icinga-checks repository), which causes problems when installing vsc-install in the tox environment.

To override the installation prefix for scripts (only in the tox environment where the tests are run), specify this via a vsc-ci.ini configuration file:

[vsc-ci]
install_scripts_prefix_override=1

Use 'easy_install' to install tox

For legacy reasons easy_install is still supported. If you still need it you can enable it (not recommended):

[vsc-ci]
easy_install_tox=1

Avoid running pip install in repo checkout

For some repositories, running pip install to install tox from the checked out repository is problematic, because of the setup.cfg containing things that should not be picked up by pip.

For those repositories, you can specify that the installation commands in the Jenkinsfile should be run from $HOME, via:

[vsc-ci]
home_install=1

Leveraging system (Python) packages

If a repository requires Python packages as dependencies that are installed as OS packages (for example, pyslurm), tox must be configured to inherit these packages in the test environment. This can be enabled via:

[vsc-ci]
inherit_site_packages=1

Pre-installing dependencies before running tests

Although vsc-install will automatically install all dependencies listed in setup.py prior to running the tests, there are cases where this doesn't work out as expected. Some Python packages only support being installed with pip install (for example because they use a namespace that is spread across multiple different Python packages, like fs and fs.sshfs).

You can specify Python packages that should be installed (with pip install) before running the tests via pip_install_test_deps in vsc-ci.ini:

[vsc-ci]
pip_install_test_deps=
    foo
    bar<1.0

This results in corresponding pip install commands being added to the commands_pre section in tox.ini:

[testenv]
commands_pre =
    pip install 'foo'
    pip install 'bar<1.0'
    pip install 'setuptools<42.0'
    python -m easy_install -U vsc-install

vsc-install's People

Contributors

alvarosimon avatar boegel avatar fkd13 avatar hajgato avatar itkovian avatar jenstimmerman avatar kwaegema avatar lexming avatar stdweird avatar vsoch avatar wdpypere avatar wpoely86 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsc-install's Issues

check_header function should signal what is exactly wrong

I got this error when adding bin/vsc_env.py to vsc-config:

test_importscripts (vsc.install.commontest.CommonTest)
Try to import each python script as a module ... INFO: run_tests from base dir /Users/kehoste/work/vsc-config (using executable /Users/kehoste/work/vsc-config/setup.py)
INFO: generated list: ['bin/vsc_env.py']
INFO: generated scripts list: ['bin/vsc_env.py']
INFO: get_header for script
INFO: python in shebang, forcing env python (header modified)
INFO: run_tests from base dir /Users/kehoste/work/vsc-config (using executable /Users/kehoste/work/vsc-config/setup.py)
INFO: found match url [email protected]:hpcugent/vsc-config in /Users/kehoste/work/vsc-config/.git/config
INFO: found match name vsc-config in /Users/kehoste/work/vsc-config/.git/config
INFO: reg found: ('github.com', 'hpcugent/vsc-config')
INFO: get_name_url returns {'url': 'https://github.com/hpcugent/vsc-config', 'name': 'vsc-config', 'download_url': 'https://github.com/hpcugent/vsc-config/archive/ALL_VERSIONS.tar.gz'}
INFO: found license /Users/kehoste/work/vsc-config/LICENSE with md5sum 4c917d76bb092659fa923f457c72d033
INFO: Found license name ARR and classifier License :: Other/Proprietary License
FAIL

The FAIL doesn't give any hint on what is wrong exactly, in the end it turned out that the problem was that /usr/bin/python was being used as shebang line rather than /usr/bin/env python, which is signalled by the python in shebang line above.

Problems like this should stand out better so you don't have to be a detective to figure out what the actual problem is.

allow vsc-install to create correct setup.cfg's

the dependencies in setup.cfg for bdist_rpm sometimes need a python prefix, and sometimes don't

we should allow setting the optional prefix in setup.py's install_requires. So we don't need to maintain a separate setup.cfg when all it needs is a python prefix here and there. This way we don't need to maintain version numbers in 2 places.

vsc-install should provide an option to generate github actions workflow file

if use_github_actions is set, a github actions file should be created under: .github/workflows/unittest.yml and look something likefor example:

name: run python tests
on: [push, pull_request]

jobs:
  python_unittests:
      runs-on: ubuntu-20.04
      strategy:
        matrix:
          python: [3.6, 3.9, 3.11]
      steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
      - name: install tox
        run: pip install tox
      - name: add mandatory git remote
        # 'hpcugent' is a mandatory remote for setup.py to work (because of get_name_url)
        run: git remote add hpcugent https://github.com/hpcugent/vsc-base.git
      - name: Run tox
        # Run tox using the version of Python in `PATH`
        run: tox -e py

unclosed file

/var/lib/jenkins/jobs/hpcugent_github.com/jobs/vsc-administration/branches/PR-97/workspace/.tox/py36/lib/python3.6/site-packages/vsc_install-0.15.12-py3.6.egg/vsc/install/shared_setup.py:350: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/lib/jenkins/jobs/hpcugent_github.com/jobs/vsc-administration/branches/PR-97/workspace/.git/config' mode='r' encoding='UTF-8'>

  txt = open(filename).read()

@boegel is this a py3 thingie? do we always need to make a context?

vsc/__init__.py file missing when doing "pip install" with "--prefix=xx"

I use python 2.7.13 and pip 9.0.1 to install Easybuild 3.1.0 with the following command:
$ pip install --install-option "--prefix=${PWD}/EasyBuild" easybuild
Executable eb is generated. PATH and PYTHONAPTH are correctly set. While doing command:
eb --version
I got the following error:

  ......
  File "/mnt/home_local/eocoe/liang/ECAM/EB/EB-Liang/EasyBuild/lib/python2.7/site-packages/easybuild/tools/build_log.py", line 40, in <module>
    from vsc.utils import fancylogger
ImportError: No module named vsc.utils

The error occurs because of the absence of vsc/__init__.py. @boegel checked that when using pip, we have:
WARN: Skipping installation of /mnt/home_local/eocoe/liang/ECAM/EB/EB-Liang/EasyBuild/lib/python2.7/site-packages/vsc/__init__.py (namespace package)
This is a pip issue that has already reported to pip in github, see (pypa/pip#1924)

One temporary solution for those who want to use pip install with their own PREFIX is, after the pip install command, do:
touch ${PREFIX}/lib/python2.7/site-packages/vsc/__init__.py
The problem should the be solved.

Further actions may relate to the setup.py of vsc_base. We may let the program detect the case when doing pip install with PREFIX and force the program to create __init__.py instead of skipping it.

"python setup.py bdist_rpm" doesn't replace shebang lines in scripts with recent setuptools

When vsc-install is used on top of a recent version of setuptools (e.g. 38.4.0), shebang lines in scripts are no longer replaced as expected when building an RPM with python setup.py bdist_rpm.

For some reason, the vsc_sdist_rpm.make_release_tree does not get triggered, even though vsc_bdist_rpm.run does get used based on the the output of python setup.py bdist_rpm, and vsc.sdist.make_release_tree gets triggered as well.

Maybe the injection of vsc_sdist_rpm into cmdclass['sdist'] (which is done in vsc_bdist_rpm.run) happens too late because of changes in recent setuptools versions?

Old install vsc-base get precedence over newly installed versions

giving strange output:

[kwaegema@daenerys vsc-base (master)]$ python setup.py install --user
run_tests from base dir /home/kwaegema/gitrepos/ugenthpc/vsc-base (using executable /home/kwaegema/gitrepos/ugenthpc/vsc-base/setup.py)
generated packages list: ['vsc', 'vsc.utils']
cleanup build
cleanup lib/vsc_base.egg-info
makesetupcfg set to True, (re)creating setup.cfg
New target = {'maintainer': 'Stijn De Weirdt;Jens Timmermans;Andy Georges;Kenneth Hoste', 'version': '2.4.16', 'install_requires': ['vsc-install >= 0.9.8'], 'setup_requires': ['vsc-install >= 0.9.8'], 'maintainer_email': '[email protected];[email protected];[email protected];[email protected]', 'author_email': '[email protected];[email protected];[email protected];[email protected]', 'packages': ['vsc', 'vsc.utils'], 'package_dir': {'': 'lib'}, 'author': 'Stijn De Weirdt;Jens Timmermans;Andy Georges;Kenneth Hoste', 'cmdclass': {'test': <class vsc.install.shared_setup.VscTestCommand at 0x7f6132244120>, 'bdist_rpm': <class vsc.install.shared_setup.vsc_bdist_rpm at 0x7f61322440b8>, 'egg_info': <class vsc.install.shared_setup.vsc_egg_info at 0x7f6132291e88>, 'install_scripts': <class vsc.install.shared_setup.vsc_install_scripts at 0x7f6132291f58>}, 'download_url': '', 'url': '', 'test_suite': 'test'}
Searching for vsc-install>=0.9.8
Reading https://pypi.python.org/simple/vsc-install/
Found link: https://pypi.python.org/packages/source/v/vsc-install/vsc-install-0.9.12.tar.gz#md5=ff9e84e6f9c766f2d6f6e2307f80c5c6
Found link: https://pypi.python.org/packages/source/v/vsc-install/vsc-install-0.9.3.tar.gz#md5=867900d4e14dcc324adcfa41176742c7
Found link: https://pypi.python.org/packages/source/v/vsc-install/vsc-install-0.9.6.tar.gz#md5=8b8c84021d7741e1e2118b6d42e39747
Best match: vsc-install 0.9.12
Downloading https://pypi.python.org/packages/source/v/vsc-install/vsc-install-0.9.12.tar.gz#md5=ff9e84e6f9c766f2d6f6e2307f80c5c6
Validating md5 checksum for /tmp/easy_install-pWtQJn/vsc-install-0.9.12.tar.gz
Processing vsc-install-0.9.12.tar.gz
Unpacking vsc-install-0.9.12 to /tmp/easy_install-pWtQJn/vsc-install-0.9.12
Unpacking vsc-install-0.9.12/LICENSE to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/LICENSE
Unpacking vsc-install-0.9.12/setup.cfg to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.cfg
Unpacking vsc-install-0.9.12/lib to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info/dependency_links.txt to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info/dependency_links.txt
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info/requires.txt to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info/requires.txt
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info/top_level.txt to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info/top_level.txt
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info/PKG-INFO to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info/PKG-INFO
Unpacking vsc-install-0.9.12/lib/vsc_install.egg-info/SOURCES.txt to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc_install.egg-info/SOURCES.txt
Unpacking vsc-install-0.9.12/lib/vsc to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc
Unpacking vsc-install-0.9.12/lib/vsc/install to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/install
Unpacking vsc-install-0.9.12/lib/vsc/install/shared_setup.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/install/shared_setup.py
Unpacking vsc-install-0.9.12/lib/vsc/install/headers.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/install/headers.py
Unpacking vsc-install-0.9.12/lib/vsc/install/testing.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/install/testing.py
Unpacking vsc-install-0.9.12/lib/vsc/install/init.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/install/init.py
Unpacking vsc-install-0.9.12/lib/vsc/fancylogger.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/fancylogger.py
Unpacking vsc-install-0.9.12/lib/vsc/init.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/lib/vsc/init.py
Unpacking vsc-install-0.9.12/README.md to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/README.md
Unpacking vsc-install-0.9.12/PKG-INFO to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/PKG-INFO
Unpacking vsc-install-0.9.12/setup.py to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.py
Reading configuration from /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.cfg
Adding new section [easy_install] to /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.cfg
Writing /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.cfg
Running vsc-install-0.9.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-pWtQJn/vsc-install-0.9.12/egg-dist-tmp-BEYFhc
INFO: This is (based on) vsc.install.shared_setup 0.9.12
INFO: run_tests from base dir /tmp/easy_install-pWtQJn/vsc-install-0.9.12 (using executable /tmp/easy_install-pWtQJn/vsc-install-0.9.12/setup.py)
WARN: cleanup lib/vsc_install.egg-info
INFO: generated list: ['vsc.install', 'vsc']
INFO: generated packages list: ['vsc.install', 'vsc']
INFO: makesetupcfg set to True, (re)creating setup.cfg
INFO: found license /tmp/easy_install-pWtQJn/vsc-install-0.9.12/LICENSE with md5sum 5f30f0716dfdd0d91eb439ebec522ec2
INFO: Found license name LGPLv2+ and classifier License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
INFO: setting license LGPLv2+
INFO: No name defined, trying to determine it
INFO: found match url https://github.com/hpcugent/vsc-install in /tmp/easy_install-pWtQJn/vsc-install-0.9.12/PKG-INFO
INFO: found match name vsc-install in /tmp/easy_install-pWtQJn/vsc-install-0.9.12/PKG-INFO
INFO: Removing None download_url
INFO: get_name_url returns {'url': 'https://github.com/hpcugent/vsc-install', 'name': 'vsc-install'}
INFO: using long_description vsc-install provides shared setuptools functions and classes for python libraries developed by UGent's HPC group
INFO: generated list: []
INFO: generated scripts list: []
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
warnings.warn(msg)
WARN: zip_safe flag not set; analyzing archive contents...
WARN: vsc.fancylogger: module references file
WARN: vsc.install.shared_setup: module references file
WARN: vsc.install.shared_setup: module references path
WARN: vsc.install.shared_setup: module MAY be using inspect.getsource
creating /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg
Extracting vsc_install-0.9.12-py2.7.egg to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs
Unpacking EGG-INFO/not-zip-safe to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/not-zip-safe
Unpacking EGG-INFO/top_level.txt to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/top_level.txt
Unpacking EGG-INFO/requires.txt to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/requires.txt
Unpacking EGG-INFO/dependency_links.txt to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/dependency_links.txt
Unpacking EGG-INFO/SOURCES.txt to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/SOURCES.txt
Unpacking EGG-INFO/PKG-INFO to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/EGG-INFO/PKG-INFO
Unpacking vsc/init.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/init.pyc
Unpacking vsc/fancylogger.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/fancylogger.pyc
Unpacking vsc/init.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/init.py
Unpacking vsc/fancylogger.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/fancylogger.py
Unpacking vsc/install/init.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/init.pyc
Unpacking vsc/install/testing.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/testing.pyc
Unpacking vsc/install/headers.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/headers.pyc
Unpacking vsc/install/shared_setup.pyc to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/shared_setup.pyc
Unpacking vsc/install/init.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/init.py
Unpacking vsc/install/testing.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/testing.py
Unpacking vsc/install/headers.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/headers.py
Unpacking vsc/install/shared_setup.py to /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg/vsc/install/shared_setup.py

Installed /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating lib/UNKNOWN.egg-info
writing requirements to lib/UNKNOWN.egg-info/requires.txt
writing lib/UNKNOWN.egg-info/PKG-INFO
writing top-level names to lib/UNKNOWN.egg-info/top_level.txt
writing dependency_links to lib/UNKNOWN.egg-info/dependency_links.txt
writing manifest file 'lib/UNKNOWN.egg-info/SOURCES.txt'
reading manifest file 'lib/UNKNOWN.egg-info/SOURCES.txt'
writing manifest file 'lib/UNKNOWN.egg-info/SOURCES.txt'
looking for extra dist files
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/vsc
copying lib/vsc/init.py -> build/lib/vsc
creating build/lib/vsc/utils
copying lib/vsc/utils/affinity.py -> build/lib/vsc/utils
copying lib/vsc/utils/run.py -> build/lib/vsc/utils
copying lib/vsc/utils/daemon.py -> build/lib/vsc/utils
copying lib/vsc/utils/rest.py -> build/lib/vsc/utils
copying lib/vsc/utils/optcomplete.py -> build/lib/vsc/utils
copying lib/vsc/utils/docs.py -> build/lib/vsc/utils
copying lib/vsc/utils/frozendict.py -> build/lib/vsc/utils
copying lib/vsc/utils/testing.py -> build/lib/vsc/utils
copying lib/vsc/utils/fancylogger.py -> build/lib/vsc/utils
copying lib/vsc/utils/exceptions.py -> build/lib/vsc/utils
copying lib/vsc/utils/mail.py -> build/lib/vsc/utils
copying lib/vsc/utils/patterns.py -> build/lib/vsc/utils
copying lib/vsc/utils/missing.py -> build/lib/vsc/utils
copying lib/vsc/utils/init.py -> build/lib/vsc/utils
copying lib/vsc/utils/generaloption.py -> build/lib/vsc/utils
copying lib/vsc/utils/asyncprocess.py -> build/lib/vsc/utils
copying lib/vsc/utils/dateandtime.py -> build/lib/vsc/utils
copying lib/vsc/utils/wrapper.py -> build/lib/vsc/utils
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/vsc
creating build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/affinity.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/run.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/daemon.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/rest.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/optcomplete.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/docs.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/frozendict.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/testing.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/fancylogger.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/exceptions.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/mail.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/patterns.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/missing.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/init.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/generaloption.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/asyncprocess.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/dateandtime.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/utils/wrapper.py -> build/bdist.linux-x86_64/egg/vsc/utils
copying build/lib/vsc/init.py -> build/bdist.linux-x86_64/egg/vsc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/affinity.py to affinity.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/run.py to run.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/daemon.py to daemon.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/rest.py to rest.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/optcomplete.py to optcomplete.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/docs.py to docs.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/frozendict.py to frozendict.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/testing.py to testing.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/fancylogger.py to fancylogger.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/exceptions.py to exceptions.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/mail.py to mail.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/patterns.py to patterns.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/missing.py to missing.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/init.py to init.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/generaloption.py to generaloption.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/asyncprocess.py to asyncprocess.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/dateandtime.py to dateandtime.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/utils/wrapper.py to wrapper.pyc
byte-compiling build/bdist.linux-x86_64/egg/vsc/init.py to init.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying lib/UNKNOWN.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lib/UNKNOWN.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lib/UNKNOWN.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lib/UNKNOWN.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lib/UNKNOWN.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
vsc.utils.exceptions: module MAY be using inspect.getouterframes
vsc.utils.fancylogger: module MAY be using inspect.stack
vsc.utils.generaloption: module MAY be using inspect.stack
creating 'dist/UNKNOWN-2.4.16-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing UNKNOWN-2.4.16-py2.7.egg
creating /home/kwaegema/.local/lib/python2.7/site-packages/UNKNOWN-2.4.16-py2.7.egg
Extracting UNKNOWN-2.4.16-py2.7.egg to /home/kwaegema/.local/lib/python2.7/site-packages
Removing UNKNOWN 1.7.6 from easy-install.pth file
Adding UNKNOWN 2.4.16 to easy-install.pth file

Installed /home/kwaegema/.local/lib/python2.7/site-packages/UNKNOWN-2.4.16-py2.7.egg
Processing dependencies for UNKNOWN==2.4.16
Searching for vsc-install==0.9.12
Best match: vsc-install 0.9.12
Processing vsc_install-0.9.12-py2.7.egg
Removing vsc-install 0.9.1 from easy-install.pth file
Adding vsc-install 0.9.12 to easy-install.pth file

Using /home/kwaegema/gitrepos/ugenthpc/vsc-base/.eggs/vsc_install-0.9.12-py2.7.egg
Searching for setuptools==17.1.1
Best match: setuptools 17.1.1
Adding setuptools 17.1.1 to easy-install.pth file
Installing easy_install script to /home/kwaegema/.local/bin
Installing easy_install-2.7 script to /home/kwaegema/.local/bin

Using /usr/lib/python2.7/site-packages
Finished processing dependencies for UNKNOWN==2.4.16

RuntimeError: setuptools >= 41 required to build

The problem is that the system-wide installed setuptools version is too old for a recent virtualenv (which is required by tox)

It's not entirely clear to me why pip3 install tox just doesn't pull in a more recent setuptools version if the existing one isn't recent enough though, that's a bit weird to me.

Clearly we need to handle this properly through vsc-install, so the Jenkinsfile installs both setuptools<42.0 (since vsc-install itself isn't compatible with setuptools>=42.0) and tox.

handle extra type of errors

VscScanningLoader should wrap the try/except block in another layer of tray/excpet, and on attribute error try to import the failed module, and if that fails, add the exception message to the originl one

  File "/var/lib/jenkins/.local/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/var/lib/jenkins/.local/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/var/lib/jenkins/.local/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/setuptools/command/test.py", line 172, in run
  File "/var/lib/jenkins/.vsc/lib/python/vsc_install-0.10.15-py2.7.egg/vsc/install/shared_setup.py", line 942, in run_tests
    res = TestCommand.run_tests(self)
  File "/var/lib/jenkins/.local/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/setuptools/command/test.py", line 193, in run_tests
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 816, in __init__
    self.parseArgs(argv)
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 843, in parseArgs
    self.createTests()
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 849, in createTests
    self.module)
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 613, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 587, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/var/lib/jenkins/.vsc/lib/python/vsc_install-0.10.15-py2.7.egg/vsc/install/shared_setup.py", line 720, in loadTestsFromModule
    testsuites = ScanningLoader.loadTestsFromModule(self, module, pattern)
  File "/var/lib/jenkins/.local/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/setuptools/command/test.py", line 40, in loadTestsFromModule
  File "/var/lib/jenkins/.local/lib/python2.6/unittest.py", line 584, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'helpers'

create a release script

We need a script that does releases to pipy and also creates releases on github, so we have a known url to put as download url (something like %(github_url)s/archive/%(name)s-V%(version)s.tar.gz

Tests fail: Can't find location of testsuite directory test in /usr/ports/devel/py-vsc-install/work-py27/vsc-install-0.11.2

On FreeBSD, when built from the PyPI tarball, tests fail:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 1541, in <module>
    action_target(PACKAGE)
  File "setup.py", line 1519, in action_target
    _fvs('action_target function')().action_target(package, *args, **kwargs)
  File "setup.py", line 1507, in action_target
    setupfn(**x)
  File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 131, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/test.py", line 228, in run
    self.run_tests()
  File "setup.py", line 970, in run_tests
    cleanup = self.setup_sys_path()
  File "setup.py", line 877, in setup_sys_path
    (DEFAULT_TEST_SUITE, self.setupper.REPO_BASE_DIR))
Exception: Can't find location of testsuite directory test in /usr/ports/devel/py-vsc-install/work-py27/vsc-install-0.11.2

vsc-install asks for credentials when using tox

when running tests locally I get:

...
INFO: Searching for vsc-config>=1.31.0
INFO: Doing git clone from ssh://[email protected]/hpcugent/vsc-config.git to /tmp/easy_install-naixMB/vsc-config.git
Enter passphrase for key '/home/wdpypere/.ssh/id_rsa': 

I see no reason why vsc-install should even try to use my SSH keys or passphrases?

support shellcheck in Jenkinsfile

we have places where we test bash in our Jenkinsfile doing things like:

    stage('test bash') {
        sh './shellcheck bin/*.sh'
    }

with the new generated Jenkinsfile this no longer works. Is there a way to add this?

check on pkg_resources.declare_namespace breaks backwards compatibility

installing older versions of vsc-base with the current vsc-install fails with:

Traceback (most recent call last):
  File "setup.py", line 65, in <module>
    shared_setup.action_target(PACKAGE)
  File "/usr/lib/python2.6/site-packages/vsc/install/shared_setup.py", line 1345, in action_target
    vsc_setup().action_target(package)
  File "/usr/lib/python2.6/site-packages/vsc/install/shared_setup.py", line 233, in __init__
    self.package_files = self.files_in_packages()
  File "/usr/lib/python2.6/site-packages/vsc/install/shared_setup.py", line 375, in files_in_packages
    'Fix with pkg_resources.declare_namespace') % root)
Exception: vsc namespace packages do not allow non-shared namespace in dir /tmp/vsc40023/easybuild_build/vscbase/1.6.9/dummy-dummy/vsc-base-vsc-base-1.6.9/lib/vsc.Fix with pkg_resources.declare_namespace

In one way, this makes sense, but this is also very annoying because a system-wide vsc-install installation can't be easily bypassed, rendering older vsc-base versions impossible to install...

Thoughts on this?

shared setup should specify that `vsc` in a namespace package

With the vsc-base/vsc-install split, EasyBuild users are running into warnings like:

/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.py:29:
UserWarning: Module vsc was already imported from
/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.pyc,
but /usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_install-0.9.12-py2.6.egg is being added to sys.path

  import pkg_resources

(cfr. easybuilders/easybuild-framework#1588)

It seems like this can be solved by specifying that vsc is a namespace packages, see https://pythonhosted.org/setuptools/setuptools.html#namespace-packages.

sdist upload to PyPI fails

I ran into this while trying to upload vsc-install 0.9.12 to PyPI:

$ python setup.py sdist upload
INFO: This is (based on) vsc.install.shared_setup 0.9.12
INFO: run_tests from base dir /Users/kehoste/work/vsc-install (using executable /Users/kehoste/work/vsc-install/setup.py)
WARN: cleanup lib/vsc_install.egg-info
INFO: generated list: ['vsc.install', 'vsc']
INFO: generated packages list: ['vsc.install', 'vsc']
INFO: makesetupcfg set to True, (re)creating setup.cfg
INFO: found license /Users/kehoste/work/vsc-install/LICENSE with md5sum 5f30f0716dfdd0d91eb439ebec522ec2
INFO: Found license name LGPLv2+ and classifier License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
INFO: setting license LGPLv2+
INFO: No name defined, trying to determine it
INFO: found match url [email protected]:hpcugent/vsc-install in /Users/kehoste/work/vsc-install/.git/config
INFO: found match name vsc-install in /Users/kehoste/work/vsc-install/.git/config
INFO: Removing None download_url
INFO: get_name_url returns {'url': 'https://github.com/hpcugent/vsc-install', 'name': 'vsc-install'}
INFO: using long_description vsc-install provides shared setuptools functions and classes for python libraries developed by UGent's HPC group
INFO: generated list: []
INFO: generated scripts list: []
INFO: running sdist
INFO: running egg_info
INFO: creating lib/vsc_install.egg-info
INFO: writing requirements to lib/vsc_install.egg-info/requires.txt
INFO: writing lib/vsc_install.egg-info/PKG-INFO
INFO: writing top-level names to lib/vsc_install.egg-info/top_level.txt
INFO: writing dependency_links to lib/vsc_install.egg-info/dependency_links.txt
INFO: writing manifest file 'lib/vsc_install.egg-info/SOURCES.txt'
INFO: reading manifest file 'lib/vsc_install.egg-info/SOURCES.txt'
INFO: writing manifest file 'lib/vsc_install.egg-info/SOURCES.txt'
INFO: looking for extra dist files
WARN: warning: vsc_sdist: standard file not found: should have one of README, README.rst, README.txt

INFO: running check
INFO: sdist make_release_tree original base_dir vsc-install-0.9.12 files ['setup.cfg', 'setup.py', 'lib/vsc/__init__.py', 'lib/vsc/fancylogger.py', 'lib/vsc/install/__init__.py', 'lib/vsc/install/headers.py', 'lib/vsc/install/shared_setup.py', 'lib/vsc/install/testing.py', 'lib/vsc_install.egg-info/PKG-INFO', 'lib/vsc_install.egg-info/SOURCES.txt', 'lib/vsc_install.egg-info/dependency_links.txt', 'lib/vsc_install.egg-info/requires.txt', 'lib/vsc_install.egg-info/top_level.txt', 'setup.py', 'lib/vsc_install.egg-info/SOURCES.txt']
INFO: sdist from shared_setup setup.py current dir /Users/kehoste/work/vsc-install
INFO: creating vsc-install-0.9.12
INFO: creating vsc-install-0.9.12/lib
INFO: creating vsc-install-0.9.12/lib/vsc
INFO: creating vsc-install-0.9.12/lib/vsc/install
INFO: creating vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: making hard links in vsc-install-0.9.12...
INFO: hard linking setup.cfg -> vsc-install-0.9.12
INFO: hard linking setup.py -> vsc-install-0.9.12
INFO: hard linking lib/vsc/__init__.py -> vsc-install-0.9.12/lib/vsc
INFO: hard linking lib/vsc/fancylogger.py -> vsc-install-0.9.12/lib/vsc
INFO: hard linking lib/vsc/install/__init__.py -> vsc-install-0.9.12/lib/vsc/install
INFO: hard linking lib/vsc/install/headers.py -> vsc-install-0.9.12/lib/vsc/install
INFO: hard linking lib/vsc/install/shared_setup.py -> vsc-install-0.9.12/lib/vsc/install
INFO: hard linking lib/vsc/install/testing.py -> vsc-install-0.9.12/lib/vsc/install
INFO: hard linking lib/vsc_install.egg-info/PKG-INFO -> vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: hard linking lib/vsc_install.egg-info/SOURCES.txt -> vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: hard linking lib/vsc_install.egg-info/dependency_links.txt -> vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: hard linking lib/vsc_install.egg-info/requires.txt -> vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: hard linking lib/vsc_install.egg-info/top_level.txt -> vsc-install-0.9.12/lib/vsc_install.egg-info
INFO: copying setup.cfg -> vsc-install-0.9.12
INFO: Writing vsc-install-0.9.12/setup.cfg
INFO: recopying dest vsc-install-0.9.12/setup.py if hardlinked
INFO: copying /Users/kehoste/work/vsc-install/setup.py -> vsc-install-0.9.12
INFO: running shared_setup as main, not adding it to sdist
INFO: copying /Users/kehoste/work/vsc-install/LICENSE -> vsc-install-0.9.12
INFO: copying /Users/kehoste/work/vsc-install/README.md -> vsc-install-0.9.12
INFO: Creating tar archive
INFO: removing 'vsc-install-0.9.12' (and everything under it)
INFO: running upload
Traceback (most recent call last):
  File "setup.py", line 1288, in <module>
    action_target(PACKAGE)
  File "setup.py", line 1272, in action_target
    setupfn(**x)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/upload.py", line 61, in finalize_options
    self.repository = config.get('server-login', 'repository')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 607, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'server-login'

This seems to be related to $HOME/.pypirc, here's mine (with passwords censored):

[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username:boegel
password:<password>

[testpypi]
username:boegel
password:<password>

This has worked fine before, not sure what changed (my $HOME/.pypirc was not touched since this last worked)...

@stdweird: can you check if you can reproduce this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.