Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch package to src-layout. #168

Merged
merged 2 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
4.7.1 (unreleased)
==================

- Nothing changed yet.
- Switch package to src-layout.
icemac marked this conversation as resolved.
Show resolved Hide resolved


4.7.0 (2021-04-13)
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include *.sh
include *.yml

recursive-include docs *
recursive-include persistent *
recursive-include src *
recursive-include .github *.yml

global-exclude *.dll
Expand All @@ -16,7 +16,7 @@ global-exclude *.so
global-exclude coverage.xml

prune docs/_build
prune persistent/__pycache__
prune src/persistent/__pycache__


include .coveragerc
Expand Down
40 changes: 18 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ def _read_file(filename):
Extension(
name='persistent.cPersistence',
sources=[
'persistent/cPersistence.c',
'persistent/ring.c',
'src/persistent/cPersistence.c',
'src/persistent/ring.c',
],
depends=[
'persistent/cPersistence.h',
'persistent/ring.h',
'persistent/ring.c',
'src/persistent/cPersistence.h',
'src/persistent/ring.h',
'src/persistent/ring.c',
],
define_macros=list(define_macros),
),
Extension(
name='persistent.cPickleCache',
sources=[
'persistent/cPickleCache.c',
'persistent/ring.c',
'src/persistent/cPickleCache.c',
'src/persistent/ring.c',
],
depends=[
'persistent/cPersistence.h',
'persistent/ring.h',
'persistent/ring.c',
'src/persistent/cPersistence.h',
'src/persistent/ring.h',
'src/persistent/ring.c',
],
define_macros=list(define_macros),
),
Extension(
name='persistent._timestamp',
sources=[
'persistent/_timestamp.c',
'src/persistent/_timestamp.c',
],
define_macros=list(define_macros),
),
Expand All @@ -81,8 +81,8 @@ def _read_file(filename):
headers = []
else:
headers = [
'persistent/cPersistence.h',
'persistent/ring.h',
'src/persistent/cPersistence.h',
'src/persistent/ring.h',
]

setup(name='persistent',
Expand All @@ -109,18 +109,16 @@ def _read_file(filename):
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
],
author="Zope Corporation",
author="Zope Foundation and Contributors",
author_email="zodb-dev@zope.org",
url="https://github.com/zopefoundation/persistent/",
license="ZPL 2.1",
platforms=["any"],
# Make sure we don't get 'terryfy' included in wheels
# created on macOS CI
packages=find_packages(include=("persistent",)),
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,
ext_modules=ext_modules,
cffi_modules=['persistent/_ring_build.py:ffi'],
cffi_modules=['src/persistent/_ring_build.py:ffi'],
headers=headers,
extras_require={
'test': [
Expand All @@ -129,9 +127,7 @@ def _read_file(filename):
],
'testing': (),
'docs': [
# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it:
# https://github.com/repoze/repoze.sphinx.autointerface/issues/16
'Sphinx < 4',
'Sphinx',
'repoze.sphinx.autointerface',
],
},
Expand Down
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.
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist =
extras =
test
commands =
zope-testrunner --test-path=. []
zope-testrunner --test-path=src []

[testenv:py27-pure]
basepython =
Expand All @@ -25,9 +25,9 @@ usedevelop = true
basepython =
python3.6
commands =
coverage run -m zope.testrunner --test-path=.
python -c 'import os, subprocess; subprocess.check_call("coverage run -a -m zope.testrunner --test-path=.", env=dict(os.environ, PURE_PYTHON="1"), shell=True)'
python -c 'import os, subprocess; subprocess.check_call("coverage run -a -m zope.testrunner --test-path=.", env=dict(os.environ, PURE_PYTHON="0"), shell=True)'
coverage run -m zope.testrunner --test-path=src
python -c 'import os, subprocess; subprocess.check_call("coverage run -a -m zope.testrunner --test-path=src", env=dict(os.environ, PURE_PYTHON="1"), shell=True)'
python -c 'import os, subprocess; subprocess.check_call("coverage run -a -m zope.testrunner --test-path=src", env=dict(os.environ, PURE_PYTHON="0"), shell=True)'
coverage report --fail-under=100
deps =
coverage
Expand Down