Commit a7532fea authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

merge old repo

---
rules:
add-new-rules:
project-kind: cubicweb-cube
fix-README:
add-pytest-deprecated-warnings:
add-pypi-publish:
add-deb-publish:
add-yamllint:
update-licence-dates:
---
# follow this doc to extend the already existing jobs:
# https://docs.gitlab.com/ee/ci/yaml/includes.html#overriding-external-template-values
# as a reminder the existing jobs are located here:
# https://forge.extranet.logilab.fr/open-source/gitlab-templates/
# or simply add more jobs here if you need them (use the already existing stages)
# /!\ remember to uncomment the include in the .gitlab-ci.yml /!\
---
default:
image: python:3.7
include:
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
file:
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
- "templates/lint/flake8.yml" # will do the equivalent of 'tox -e flake8'
- "templates/lint/check-manifest.yml" # will do the equivalent of 'tox -e check-manifest'
- "templates/lint/yamllint.yml" # will do the equivalent of 'tox -e yamllint'
- "templates/tests/py27.yml" # will do the equivalent of 'tox -e py27'
- "templates/create-release-on-heptapod.yml" # this will create a release on heptapod
- "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi
# uncomment and uses to customize/extend the configuration here if needed
# (it needs to be at the same level than "- project")
# - ".gitlab-ci-extended.yml"
stages:
- lint
- tests
- release
- publish
ignore: |
.tox/
node_modules/
extends: default
rules:
document-start: disable
line-length: disable
indentation:
spaces: 2
include README
include *.py
include */*.py
recursive-include cubicweb_i18nfield *.py
recursive-include cubicweb_i18nfield/data *.gif *.png *.ico *.css *.js
recursive-include cubicweb_i18nfield/i18n *.po
recursive-include test/data bootstrap_cubes *.py
include tox.ini
prune debian
include README.rst
exclude .gitlab-ci.yml
exclude .yamllint
exclude .cube-doctor.yml
exclude .gitlab-ci-extended.yml
# -*- coding: utf-8 -*-
# pylint: disable=W0622
"""cubicweb-i18nfield application packaging information"""
from os import listdir as _listdir
from os.path import join, isdir
from glob import glob
modname = 'i18nfield'
distname = 'cubicweb-i18nfield'
numversion = (0, 1, 0)
version = '.'.join(str(num) for num in numversion)
license = 'LGPL'
author = 'Florent Cayré (Villejuif, FRANCE)'
author_email = 'Florent Cayré <florent.cayre@gmail.com>'
description = 'Provides a way to translate entity fields individually.'
web = 'https://forge.extranet.logilab.fr/cubicweb/cubes/%s' % distname
__depends__ = {
'cubicweb': '>= 3.24',
'cubicweb-card': '>= 0.5',
}
__recommends__ = {}
THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
def listdir(dirpath):
return [join(dirpath, fname) for fname in _listdir(dirpath)
if fname[0] != '.' and not fname.endswith('.pyc')
and not fname.endswith('~')
and not isdir(join(dirpath, fname))]
data_files = [
# common files
[THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
]
# check for possible extended cube layout
for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
'wdoc', 'i18n', 'migration'):
if isdir(dname):
data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
# Note: here, you'll need to add subdirectories if you want
# them to be included in the debian package
cubicweb-i18nfield (0.1.1-1) unstable; urgency=low
* initial release
-- Katia Saurfelt <katia.saurfelt@logilab.fr> Wed, 17 Apr 2019 18:27:25 +0200
cubicweb-i18nfield (0.1.0-1) unstable; urgency=low
* initial release
-- Florent Cayré <florent.cayre@logilab.fr> Fri, 24 Oct 2014 12:28:28 +0200
Source: cubicweb-i18nfield
Section: web
Priority: optional
Maintainer: LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
Build-Depends: debhelper (>= 7), python (>= 2.6), python-support
Standards-Version: 3.9.3
XS-Python-Version: >= 2.6
Package: cubicweb-i18nfield
Architecture: all
Depends:
cubicweb-common (>= 3.18.0),
${python:Depends},
${misc:Depends},
Description: Provides a way to translate entity fields individually.
CubicWeb is a semantic web application framework.
.
Provides a way to translate entity fields individually.
.
This package will install all the components you need to run the
cubicweb-i18nfield application (cube :)..
Upstream Author:
LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
Copyright:
Copyright (c) 2014 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr -- mailto:contact@logilab.fr
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-arch build-indep
build-arch:
# Nothing to do
build-indep: build-stamp
build-stamp:
dh_testdir
NO_SETUPTOOLS=1 python setup.py -q build
touch build-stamp
clean:
dh_testdir
rm -f build-stamp configure-stamp
rm -rf build
find . -name "*.pyc" -delete
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -i
NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/cubicweb-i18nfield/usr/
# remove generated .egg-info file
rm -rf debian/cubicweb-i18nfield/usr/lib/python*
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_install -i
dh_installchangelogs -i
dh_installexamples -i
dh_installdocs -i README
dh_installman -i
dh_pysupport -i /usr/share/cubicweb
dh_link -i
dh_compress -i -X.py -X.ini -X.xml -Xtest
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch:
binary: binary-indep
.PHONY: build clean binary-arch binary-indep binary
#!/usr/bin/env python
# pylint: disable=W0142,W0403,W0404,W0613,W0622,W0622,W0704,R0904,C0103,E0611
#
# copyright 2003-2020 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2003-2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb tag cube.
......@@ -35,6 +35,7 @@ __pkginfo__ = {}
with open(pkginfo) as f:
exec(f.read(), __pkginfo__)
# get required metadatas
distname = __pkginfo__['distname']
version = __pkginfo__['version']
......@@ -45,7 +46,7 @@ author = __pkginfo__['author']
author_email = __pkginfo__['author_email']
classifiers = __pkginfo__['classifiers']
with open(join(here, 'README')) as f:
with open(join(here, 'README.rst')) as f:
long_description = f.read()
# get optional metadatas
......
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2003-2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
......
[tox]
envlist = py27,flake8,check-manifest
envlist = py27,flake8,check-manifest,yamllint
[testenv]
deps =
pytest
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest test {posargs}
......@@ -24,7 +25,29 @@ commands =
[flake8]
format = pylint
ignore = W503
exclude = migration/*,test,setup.py,.tox/*,scripts,doc
exclude = cubicweb_i18nfield/migration/*,test,setup.py,.tox/*,scripts,doc
max-line-length = 100
max-complexity = 12
[testenv:pypi-publish]
basepython = python3
skip_install = true
whitelist_externals = rm
deps =
twine
passenv =
TWINE_USERNAME
TWINE_PASSWORD
commands =
rm -rf build dist .egg .egg-info
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload --skip-existing dist/*
[testenv:yamllint]
skip_install = true
deps = yamllint
commands =
yamllint .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment